:root {
  --bg: #f5f8f7;
  --panel: #ffffff;
  --text: #10231f;
  --muted: #6b7f79;
  --line: #e4ece9;
  --sidebar: #0d1c19;
  --sidebar-text: #9fb4ae;
  --accent: #0b8f7d;
  --accent-dark: #087466;
  --accent-soft: #e8f7f3;
  --done: #0b8f7d;
  --remain: #477a70;
  --alert: #b42318;
  --shadow-sm: 0 1px 2px rgba(16, 35, 31, 0.04), 0 8px 24px rgba(16, 35, 31, 0.045);
  --shadow-md: 0 2px 4px rgba(16, 35, 31, 0.04), 0 18px 50px rgba(16, 35, 31, 0.07);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.layout {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 18px 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 0 6px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #10a993, var(--accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #fff;
  font-size: 14px;
}

.brand small {
  color: #7d8d9c;
  margin-top: 2px;
  font-size: 12px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
  border: 1px solid transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-icon {
  width: 1.4em;
  text-align: center;
  font-size: 13px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e8eef4;
}

.nav-link.is-active {
  background: linear-gradient(90deg, rgba(19, 166, 145, 0.24), rgba(19, 166, 145, 0.09));
  color: #fff;
  border-color: rgba(79, 209, 189, 0.14);
  box-shadow: inset 3px 0 0 #20b8a1;
}

.sidebar-profile {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding: 14px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #c5d0dc;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-profile strong,
.sidebar-profile small {
  display: block;
}

.sidebar-profile strong {
  color: #fff;
  font-size: 13px;
}

.sidebar-profile small {
  color: #7d8d9c;
  font-size: 12px;
  margin-top: 1px;
}

.sidebar-profile .sidebar-logout {
  color: #d4e1dd;
  font-size: 12px;
  margin-top: 7px;
  display: inline-block;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 225, 221, 0.35);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.login-shell .form-panel {
  width: min(420px, 100%);
}

.nav-toggle,
.nav-toggle-input {
  display: none;
}

.content {
  flex: 1;
  padding: 26px 30px 32px;
  min-width: 0;
  max-width: 1680px;
}

.brand-kicker {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--muted);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.page-header h1 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.page-header p,
.stub p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px !important;
  font-size: 12px !important;
}

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

.status-badge.is-done {
  background: #e8f7ee;
  color: var(--done);
}

.status-badge.is-alert {
  background: #fdecec;
  color: var(--alert);
}

.status-badge.client-status-new {
  background: #eef2fd;
  color: #3554d1;
}

.status-badge.client-status-in_progress {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-badge.client-status-paused {
  background: #fdf3e0;
  color: #9a6b00;
}

.status-badge.client-status-done {
  background: #e8f7ee;
  color: var(--done);
}

.status-badge.client-status-rebuy {
  background: #f1ecfb;
  color: #6a3fc7;
}

.status-badge.client-status-archive {
  background: #eef1f0;
  color: var(--muted);
}

.crumb {
  margin: 0 0 6px;
  font-size: 13px;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
}

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}

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

.kpi-groups {
  display: grid;
  grid-template-columns: 2fr 1.15fr 1fr;
  gap: 10px;
}

.kpi-group,
.card,
.stub,
.panel,
.chart-card,
.actions-bar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.kpi-group {
  padding: 10px 10px 10px;
}

.kpi-group h2 {
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.kpi-row {
  display: grid;
  gap: 8px;
}

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

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

.kpi {
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}

.kpi.is-done {
  border-left-color: var(--done);
}

.kpi.is-remain {
  border-left-color: var(--remain);
}

.kpi.is-alert {
  border-left-color: var(--alert);
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.kpi strong {
  font-size: 20px;
  letter-spacing: -0.04em;
  word-break: break-word;
  color: var(--text);
}

.kpi.is-done strong {
  color: var(--done);
}

.kpi.is-remain strong {
  color: var(--remain);
}

.kpi.is-alert strong {
  color: var(--alert);
}

.actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  padding: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.btn:hover {
  background: var(--accent-dark);
  box-shadow: 0 8px 20px rgba(11, 143, 125, 0.18);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: #c9e8e1;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 6px 10px;
}

.charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-areas:
    "orders reviews"
    "progress marketplaces";
  gap: 10px;
}

.chart-orders {
  grid-area: orders;
}

.chart-reviews {
  grid-area: reviews;
}

.chart-products {
  grid-area: progress;
}

.chart-marketplaces {
  grid-area: marketplaces;
}

.chart-card {
  padding: 16px 18px 14px;
}

.chart-card h2,
.panel-head h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.chart-body {
  position: relative;
  height: 190px;
}

.chart-card.is-empty .chart-body {
  height: auto;
  min-height: 88px;
}

.chart-body canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 88px;
  padding: 12px 4px;
  color: var(--muted);
}

.chart-empty[hidden],
canvas[hidden] {
  display: none;
}

.chart-empty strong {
  color: var(--text);
  font-size: 14px;
}

.chart-empty span {
  font-size: 13px;
}

.panel {
  margin-top: 10px;
  padding: 4px 0 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 8px;
}

.empty {
  margin: 0;
  padding: 16px 14px;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  white-space: nowrap;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.table tr:last-child td {
  border-bottom: 0;
}

.cell-done {
  color: var(--done);
  font-weight: 600;
}

.cell-remain {
  color: var(--remain);
  font-weight: 600;
}

.cell-alert {
  color: var(--alert);
  font-weight: 600;
}

.table-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

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

.table-actions a {
  color: var(--accent);
  text-decoration: none;
  margin-left: 12px;
}

.details {
  margin: 0;
  padding: 8px 20px 16px;
  display: grid;
  gap: 14px;
}

.details dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.details dd {
  margin: 0;
  font-size: 16px;
}

.form-panel {
  padding: 20px;
  max-width: 520px;
}

.form-panel-wide {
  max-width: 860px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

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

.search input {
  min-width: 240px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  background: #fff;
}

.empty-state {
  padding: 8px 0 16px;
}

.empty-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 14px 8px;
}

.details-grid {
  grid-template-columns: 1fr 1fr;
}

.chart-solo {
  margin-top: 10px;
}

.error-list {
  margin: 0;
  padding: 8px 20px 16px 36px;
  color: var(--alert);
}

.status-list {
  margin: 0;
  padding: 8px 20px 16px 20px;
  display: grid;
  gap: 8px;
}

.status-list li {
  list-style: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.status-list .is-ok {
  background: #e8f7ee;
  color: var(--done);
}

.status-list .is-warn {
  background: #fff6e5;
  color: var(--remain);
}

.status-list .is-error {
  background: #fdecec;
  color: var(--alert);
}

.field select,
.field textarea,
.field input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

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

.field span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.form-error {
  margin: 0 0 14px;
  color: var(--alert);
}

.card {
  padding: 16px;
}

.card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.card strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.stub {
  margin-top: 24px;
  padding: 16px;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 36px;
  align-items: center;
  margin-bottom: 26px;
  padding: 30px 32px;
  border: 1px solid rgba(11, 143, 125, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 95% 0%, rgba(19, 169, 147, 0.15), transparent 38%),
    linear-gradient(135deg, #ffffff 0%, #f3fbf9 100%);
  box-shadow: var(--shadow-md);
}

.dashboard-hero::after {
  position: absolute;
  right: -54px;
  bottom: -84px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(11, 143, 125, 0.1);
  border-radius: 50%;
  content: "";
}

.hero-copy,
.hero-progress {
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  margin: 3px 0 2px;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-client {
  margin: 8px 0 0;
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 650;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-meta > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(11, 143, 125, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #47635c;
  font-size: 12px;
}

.hero-meta .status-badge {
  padding: 5px 10px;
}

.status-badge i {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.hero-progress {
  padding: 20px;
  border: 1px solid rgba(11, 143, 125, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

.progress-heading,
.progress-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.progress-heading strong {
  color: var(--accent-dark);
  font-size: 25px;
  letter-spacing: -0.04em;
}

.progress-track {
  overflow: hidden;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #e6efec;
}

.progress-track > span {
  display: block;
  min-width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), #18b49d);
}

.progress-track-large {
  height: 9px;
  margin: 12px 0 10px;
}

.hero-progress > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.hero-filters {
  margin-top: 18px;
}

.hero-filters .chip {
  padding: 5px 10px;
  background: transparent;
}

.hero-filters .chip.is-active {
  background: var(--accent);
}

.dashboard-section {
  margin-top: 24px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  padding: 0 2px;
}

.section-heading h2 {
  margin: 1px 0 0;
  font-size: 19px;
  letter-spacing: -0.025em;
}

.section-heading > p {
  margin: 0 0 1px;
  color: var(--muted);
  font-size: 12px;
}

.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

.kpi-card {
  position: relative;
  min-height: 128px;
  padding: 19px 20px;
  overflow: hidden;
  border: 1px solid rgba(228, 236, 233, 0.9);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.kpi-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 76px;
  height: 76px;
  border-radius: 0 0 0 76px;
  background: linear-gradient(135deg, transparent, rgba(11, 143, 125, 0.055));
  content: "";
}

.kpi-card.is-accent {
  border-color: rgba(11, 143, 125, 0.17);
  background: linear-gradient(145deg, #ffffff, #f1faf8);
}

.kpi-card > span,
.kpi-card > small,
.products-work-table small {
  display: block;
  color: var(--muted);
}

.kpi-card > span {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
}

.kpi-card > strong {
  display: block;
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.kpi-card.is-accent > strong {
  color: var(--accent-dark);
}

.kpi-card > small {
  margin-top: 10px;
  font-size: 11px;
}

.kpi-money > strong {
  font-size: clamp(22px, 2vw, 29px);
}

.dashboard-actions {
  justify-content: flex-end;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.charts {
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.75fr);
  gap: 12px;
}

.chart-card {
  border-color: rgba(228, 236, 233, 0.9);
  box-shadow: var(--shadow-sm);
}

.chart-title h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.chart-title p {
  margin: 3px 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 12px;
  align-items: start;
  margin-top: 24px;
}

.dashboard-panel {
  margin-top: 0;
  overflow: hidden;
  padding-top: 0;
  border-color: rgba(228, 236, 233, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.dashboard-panel .panel-head {
  padding: 18px 18px 13px;
}

.dashboard-panel .panel-head h2 {
  margin: 2px 0 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.products-work-table th,
.products-work-table td {
  padding: 12px 18px;
}

.products-work-table th {
  background: #f8faf9;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.products-work-table td {
  vertical-align: middle;
}

.product-article {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.products-work-table small {
  max-width: 190px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
}

.marketplace-pill,
.product-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 650;
}

.product-status {
  background: #f0f4f2;
  color: #557069;
}

.product-status.status-completed {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.product-progress-cell {
  min-width: 180px;
}

.progress-inline {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.progress-inline strong {
  color: var(--accent-dark);
}

.open-link {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid #cce7e1;
  border-radius: 8px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.open-link:hover {
  background: var(--accent-soft);
}

.event-list {
  padding: 0 18px 9px;
}

.event-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.event-mark {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
}

.event-item strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
}

.event-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.event-link {
  text-decoration: none;
}

.project-progress-footer {
  display: grid;
  grid-template-columns: minmax(200px, 0.35fr) 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #102d27;
  color: #fff;
}

.project-progress-footer span {
  font-size: 13px;
  font-weight: 650;
}

.project-progress-footer small {
  display: block;
  margin-top: 3px;
  color: #9db9b2;
  font-size: 10px;
}

.project-progress-footer .progress-track {
  background: rgba(255, 255, 255, 0.14);
}

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

@media (max-width: 1280px) {
  .kpi-groups,
  .charts {
    grid-template-columns: 1fr 1fr;
  }

  .charts {
    grid-template-areas:
      "orders orders"
      "reviews progress"
      "marketplaces marketplaces";
  }

  .dashboard-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .kpi-row-4 {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

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

@media (max-width: 800px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: 0;
    padding: 14px;
  }

  .nav-toggle {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    cursor: pointer;
  }

  .nav {
    display: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .nav-toggle-input:checked ~ .nav {
    display: flex;
  }

  .sidebar-profile {
    margin-top: 10px;
  }

  .content {
    padding: 14px;
  }

  .dashboard-hero {
    margin-bottom: 20px;
    padding: 22px 18px;
    border-radius: 18px;
  }

  .hero-progress {
    padding: 16px;
  }

  .hero-meta {
    gap: 6px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .kpi-groups,
  .kpi-row-2,
  .kpi-row-4,
  .kpi-grid,
  .charts,
  .form-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .charts {
    grid-template-areas:
      "orders"
      "reviews"
      "progress"
      "marketplaces";
  }

  .chart-body {
    height: 180px;
  }

  .dashboard-columns {
    margin-top: 20px;
  }

  .project-progress-footer {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }
}

/* ===== Premium interactions & animations ===== */

@keyframes crm-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes crm-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes crm-badge-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(11, 143, 125, 0.32);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(11, 143, 125, 0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* 1. Cards fade in from below on page load, staggered. */
  .kpi-card,
  .chart-card,
  .panel,
  .stub {
    animation: crm-fade-in-up 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .kpi-card:nth-of-type(1),
  .chart-card:nth-of-type(1),
  .panel:nth-of-type(1) {
    animation-delay: 0ms;
  }
  .kpi-card:nth-of-type(2),
  .chart-card:nth-of-type(2),
  .panel:nth-of-type(2) {
    animation-delay: 50ms;
  }
  .kpi-card:nth-of-type(3),
  .chart-card:nth-of-type(3),
  .panel:nth-of-type(3) {
    animation-delay: 100ms;
  }
  .kpi-card:nth-of-type(4),
  .chart-card:nth-of-type(4),
  .panel:nth-of-type(4) {
    animation-delay: 150ms;
  }
  .kpi-card:nth-of-type(5),
  .panel:nth-of-type(5) {
    animation-delay: 200ms;
  }
  .kpi-card:nth-of-type(6),
  .panel:nth-of-type(6) {
    animation-delay: 250ms;
  }
  .kpi-card:nth-of-type(7) {
    animation-delay: 300ms;
  }
  .kpi-card:nth-of-type(8) {
    animation-delay: 350ms;
  }
  .kpi-card:nth-of-type(9) {
    animation-delay: 400ms;
  }

  /* 7. Section/page transition: whole content area fades in, no hard jump. */
  main.content {
    animation: crm-fade-in 150ms ease both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kpi-card,
  .chart-card,
  .panel,
  .stub,
  main.content {
    animation: none;
  }
}

/* 3. Buttons: shadow lift + color shift, 150ms. */
.btn,
.btn-secondary,
.btn-ghost {
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease,
    color 150ms ease, border-color 150ms ease;
}

.btn-ghost:hover {
  box-shadow: 0 6px 16px rgba(11, 143, 125, 0.12);
  transform: translateY(-1px);
}

/* 4. Status badges: "в работе"/active states pulse softly, others stay put.
   Scoped to the hero project-status badge and client/product "in progress"
   states only — the generic .is-done badge is also used for static
   validation checkmarks (import preview rows) where pulsing would be noise. */
.hero-meta .status-badge.is-done,
.status-badge.client-status-in_progress,
.product-status.status-in_progress {
  animation: crm-badge-pulse 2.6s ease-in-out infinite;
}

.status-badge.client-status-archive {
  opacity: 0.72;
}

@media (prefers-reduced-motion: reduce) {
  .status-badge.is-done,
  .status-badge.client-status-in_progress,
  .product-status.status-in_progress {
    animation: none;
  }
}

/* 6. Progress bars: animate width changes smoothly (JS sets the final width
   on load/first-view — see crm-animate.js). */
.progress-track > span {
  transition: width 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* 8. Table rows: soft highlight on hover. */
.table tbody tr {
  transition: background-color 150ms ease;
}

.table tbody tr:hover {
  background-color: var(--accent-soft);
}

/* 2. Modal: scale + fade open/close, backdrop fades. */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 28, 25, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0ms linear 200ms;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease, visibility 0ms linear 0ms;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 22px;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease;
}

.modal-backdrop.is-open .modal {
  transform: scale(1);
  opacity: 1;
}

.modal h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

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

.modal .form-actions {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal {
    transition: none;
  }
}
