/* Client Workspace — дополнения к workspace.css (единый стиль с экспертом) */

.hidden { display: none !important; }

.cw-body {
  --sidebar-w: 280px;
}

.cw-stats-links .cw-stat-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.cw-profile-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.65rem 1.5rem;
  background: rgba(59, 130, 246, 0.12);
  border-bottom: 1px solid rgba(59, 130, 246, 0.25);
  color: #e2e8f0;
  font-size: 0.9rem;
}

.cw-profile-notice.hidden {
  display: none !important;
}

.ws-empty--inline {
  padding: 1rem 0;
}

.ws-empty--inline p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .cw-profile-notice {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }
}

.cw-body .ws-nav-badge {
  margin-left: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent-gold);
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cw-order-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cw-order-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.cw-order-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.cw-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.cw-status--new { background: rgba(212, 175, 55, 0.15); color: #d4af37; }
.cw-status--responses { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.cw-status--work { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.cw-status--done { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

.cw-response-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--bg-card);
}

.cw-response-card + .cw-response-card {
  margin-top: 0.75rem;
}

.cw-response-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cw-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.cw-response-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.cw-form-page {
  max-width: 720px;
}

.cw-form-page .ws-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.cw-form-page input,
.cw-form-page textarea,
.cw-form-page select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font: inherit;
}

.cw-form-page small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .cw-response-actions .ws-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ── Company Dashboard ───────────────────────────────────── */

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

.cw-notify-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.75rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.cw-notify-btn:hover {
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.cw-notify-btn__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--accent-gold);
  color: #0f172a;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cw-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cw-org-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: box-shadow 0.2s, transform 0.2s;
}

.cw-org-header:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.cw-org-header__name {
  margin: 0 0 0.35rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.15;
}

.cw-org-header__meta {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cw-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 600;
}

.cw-org-header__btn {
  flex-shrink: 0;
}

.cw-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cw-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.cw-stat-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.cw-stat-card__icon {
  color: var(--accent-gold);
  opacity: 0.9;
}

.cw-stat-card__value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.cw-stat-card__label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cw-dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.cw-dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.cw-panel {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: box-shadow 0.2s;
}

.cw-panel:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cw-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cw-panel__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cw-panel__head .cw-panel__title {
  margin-bottom: 0;
}

.cw-deadline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cw-deadline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border-color);
}

.cw-deadline-item--urgent {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.cw-deadline-item--urgent .cw-deadline-item__text {
  color: #fca5a5;
}

.cw-deadline-item__text {
  font-size: 0.9rem;
  flex: 1;
}

.cw-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.cw-badge--work { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.cw-badge--done { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.cw-badge--new { background: rgba(212, 175, 55, 0.15); color: #d4af37; }
.cw-badge--responses { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.cw-badge--muted { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.cw-cat-badge {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 500;
}

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

.cw-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cw-orders-table th,
.cw-orders-table td {
  padding: 0.75rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.cw-orders-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cw-orders-table__title {
  font-weight: 600;
  color: var(--text-primary);
}

.cw-orders-cards {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.cw-order-mini {
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.35);
}

.cw-order-mini__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cw-order-mini__meta {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cw-order-mini__foot {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cw-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cw-action-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.35);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.cw-action-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.cw-action-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

.cw-action-card__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.cw-doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cw-doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-color);
}

.cw-doc-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cw-doc-item__info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  font-size: 0.9rem;
}

.cw-dashboard-aside {
  position: sticky;
  top: 1rem;
  transition: box-shadow 0.3s;
}

.cw-dashboard-aside--highlight {
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.5);
  border-radius: var(--radius);
}

.cw-notify-panel .cw-panel__title {
  margin-bottom: 0;
}

.cw-notify-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--accent-gold);
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 700;
}

.cw-notify-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cw-notify-item a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}

.cw-notify-item a:hover {
  background: rgba(212, 175, 55, 0.08);
}

.cw-notify-item__text {
  font-size: 0.88rem;
  line-height: 1.35;
}

.cw-notify-item__time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 1100px) {
  .cw-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .cw-dashboard-aside {
    position: static;
  }
}

@media (max-width: 900px) {
  .cw-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cw-actions-grid {
    grid-template-columns: 1fr;
  }

  .cw-orders-table-wrap {
    display: none;
  }

  .cw-orders-cards {
    display: flex;
  }

  .cw-org-header {
    flex-direction: column;
  }

  .cw-org-header__btn {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .cw-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .cw-stat-card {
    padding: 1rem;
  }

  .cw-stat-card__value {
    font-size: 1.35rem;
  }

  .cw-deadline-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cw-doc-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Public org profile page ─────────────────────────────── */

.cw-public-page {
  min-height: 100vh;
}

.cw-public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
}

.cw-public-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

.cw-public-header__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cw-public-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.cw-org-profile--embedded {
  margin: -0.25rem 0 0;
}

.cw-org-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.cw-org-hero__main {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  min-width: 0;
}

.cw-org-logo {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.75rem;
  font-weight: 700;
  overflow: hidden;
}

.cw-org-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cw-org-hero__name {
  margin: 0 0 0.5rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
}

.cw-org-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.cw-org-type {
  display: inline-flex;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.cw-org-type--ooo { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.cw-org-type--ip { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.cw-org-type--self { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }

.cw-org-unverified {
  display: inline-flex;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
}

.cw-org-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin: 0;
  font-size: 0.9rem;
}

.cw-org-rating__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.cw-org-rating__stars {
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.cw-org-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cw-org-layout {
  display: grid;
  grid-template-columns: 30% 1fr;
  gap: 1.5rem;
  align-items: start;
}

.cw-org-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cw-org-info-card {
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.cw-org-info-card h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.cw-org-dl {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.cw-org-dl dt {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cw-org-dl dd {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.cw-org-dl dd a {
  color: var(--accent-gold);
  text-decoration: none;
}

.cw-org-dl dd a:hover {
  text-decoration: underline;
}

.cw-org-dl--compact {
  margin-top: 0.75rem;
}

.cw-org-about {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.cw-org-quick-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cw-org-quick-link {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.35);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.cw-org-quick-link:hover {
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.cw-org-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.cw-org-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cw-org-stat {
  padding: 1rem 1.15rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: box-shadow 0.2s, transform 0.2s;
}

.cw-org-stat:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.cw-org-stat__value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.cw-org-stat__label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cw-org-response-rate {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 0.9rem;
}

.cw-org-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cw-org-order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.35);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.cw-org-order-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.cw-org-order-card__main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.cw-org-order-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cw-org-reviews {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cw-org-review {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.cw-org-review:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.cw-org-review__text {
  margin: 0 0 0.5rem;
  font-style: italic;
  line-height: 1.45;
}

.cw-org-review__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  font-size: 0.85rem;
}

.cw-org-review__stars {
  color: var(--accent-gold);
}

.cw-org-blog {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cw-org-blog-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
}

.cw-org-blog-item:last-child {
  border-bottom: none;
}

.cw-org-blog-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
}

.cw-org-blog-link:hover {
  color: var(--accent-gold);
}

.cw-org-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cw-org-achievement {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(212, 175, 55, 0.08);
  color: var(--accent-gold);
  font-size: 0.82rem;
  font-weight: 500;
}

.cw-org-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.cw-org-empty__icon {
  color: var(--accent-gold);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.cw-org-empty h2 {
  margin: 0 0 0.5rem;
}

.cw-org-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Modal */
.cw-modal[hidden] {
  display: none !important;
}

.cw-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cw-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.cw-modal__dialog {
  position: relative;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.cw-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.cw-modal__head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.cw-modal__close {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cw-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.cw-org-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.cw-org-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.cw-org-form__full {
  grid-column: 1 / -1;
}

.cw-org-form input,
.cw-org-form select,
.cw-org-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font: inherit;
}

@media (max-width: 960px) {
  .cw-org-layout {
    grid-template-columns: 1fr;
  }

  .cw-org-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .cw-org-hero {
    flex-direction: column;
  }

  .cw-org-hero__main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cw-org-hero__badges,
  .cw-org-rating {
    justify-content: center;
  }

  .cw-org-hero__actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .cw-org-order-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .cw-org-form__grid {
    grid-template-columns: 1fr;
  }

  .cw-public-main {
    padding: 1rem;
  }
}

/* ——— Registration wizard ——— */
.cw-reg-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: #0f172a;
}

.cw-reg-card {
  width: min(720px, 100%);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.15);
  background: #1e293b;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.cw-reg-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: #f8fafc;
  text-decoration: none;
  font-weight: 700;
}

.cw-reg-card h1 {
  margin: 0 0 0.35rem;
  color: #f8fafc;
  font-size: 1.5rem;
}

.cw-reg-lead {
  color: #94a3b8;
  margin: 0 0 1.5rem;
}

.cw-reg-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.75rem;
}

.cw-reg-step {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
}

.cw-reg-step.active {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
}

.cw-reg-step.done {
  border-color: #10b981;
  color: #10b981;
}

.cw-reg-step-line {
  flex: 1;
  height: 2px;
  background: #334155;
  max-width: 4rem;
}

.cw-reg-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: #f8fafc;
}

.cw-reg-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.cw-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: #b8bcc8;
}

.cw-field--full { grid-column: 1 / -1; }

.cw-field input,
.cw-field select,
.cw-field textarea {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  font: inherit;
}

.cw-field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.65rem;
}

.cw-hint {
  font-size: 0.78rem;
  color: #64748b;
}

.cw-section-label {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cw-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.cw-type-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 2px solid #334155;
  border-radius: 12px;
  background: #0f172a;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.cw-type-card input { display: none; }

.cw-type-card.selected,
.cw-type-card:hover {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.06);
}

.cw-type-card__icon { font-size: 1.75rem; }
.cw-type-card__title { font-weight: 600; color: #f8fafc; font-size: 0.9rem; }
.cw-type-card__hint { font-size: 0.78rem; color: #94a3b8; line-height: 1.4; }

.cw-reg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #334155;
}

.cw-reg-footer {
  margin-top: 1.25rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

.cw-reg-footer a { color: #d4af37; }

/* ——— Client profile tabs ——— */
.cw-client-profile { color: #f8fafc; }

.cw-profile-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cw-profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #334155;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.cw-profile-tab {
  padding: 0.75rem 1.25rem;
  border: none;
  background: none;
  color: #94a3b8;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.cw-profile-tab:hover { color: #f8fafc; }

.cw-profile-tab.active {
  color: #d4af37;
  border-bottom-color: #d4af37;
}

.cw-profile-panel { display: none; }
.cw-profile-panel.active { display: block; }

.cw-profile-hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.cw-profile-logo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: #d4af37;
  background: #0f172a;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.cw-profile-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cw-profile-logo--editable { cursor: pointer; }

.cw-profile-logo__edit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.5rem;
  font-size: 0.7rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
}

.cw-profile-logo--editable:hover .cw-profile-logo__edit { opacity: 1; }

.cw-profile-name {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.cw-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.cw-type-badge {
  display: inline-flex;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.cw-type-badge--legal { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.cw-type-badge--ip { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.cw-type-badge--self { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.cw-type-badge--individual { background: rgba(107, 114, 128, 0.25); color: #d1d5db; }

.cw-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.cw-unverified-badge {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.cw-profile-rating__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #d4af37;
}

.cw-profile-rating__stars { color: #d4af37; margin: 0 0.35rem; }

.cw-profile-section {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #334155;
}

.cw-profile-section h3 {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cw-profile-textarea,
.cw-profile-input {
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  font: inherit;
}

.cw-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cw-dl dt {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.5rem;
}

.cw-dl dd {
  margin: 0.15rem 0 0;
  color: #f8fafc;
}

.cw-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cw-tag {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  color: #d4af37;
  font-size: 0.8rem;
}

.cw-requisites__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.cw-requisites-dl {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0.5rem 1rem;
}

.cw-requisites-dl dt {
  color: #64748b;
  font-size: 0.85rem;
}

.cw-requisites-dl dd {
  margin: 0;
  color: #f8fafc;
}

.cw-team-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.cw-team-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #334155;
  transition: border-color 0.2s;
}

.cw-team-card:hover { border-color: rgba(212, 175, 55, 0.3); }

.cw-team-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.cw-reviews-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.cw-review-card {
  padding: 1rem;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #334155;
}

.cw-review-card__text { margin: 0 0 0.5rem; font-style: italic; }

.cw-review-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  margin: 0;
}

.cw-review-stars { color: #d4af37; }

.cw-orders-tab .cw-table { width: 100%; margin-bottom: 1rem; }

.cw-profile-empty {
  text-align: center;
  padding: 3rem 1.5rem;
}

.cw-profile-empty__icon { font-size: 3rem; margin-bottom: 1rem; }

.cw-profile-empty__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.cw-empty-state {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
}

.cw-empty-state--inline {
  padding: 1.25rem 1rem;
}

.cw-field-empty {
  text-align: center;
  padding: 1rem;
  margin: 0.75rem 0;
  border-radius: 12px;
  border: 1px dashed #334155;
  background: rgba(15, 23, 42, 0.35);
}

.cw-field-empty--large {
  padding: 2rem 1.5rem;
}

.cw-profile-logo--empty-state {
  border-style: dashed;
  opacity: 0.85;
}

.cw-profile-logo__empty {
  font-size: 2rem;
  color: #64748b;
}

/* ——— Onboarding ——— */
.cw-onboarding {
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.cw-onboarding__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.cw-onboarding__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
  transition: background 0.2s, transform 0.2s;
}

.cw-onboarding__dot.active {
  background: #d4af37;
  transform: scale(1.2);
}

.cw-onboarding__dot.done {
  background: rgba(212, 175, 55, 0.45);
}

.cw-onboarding__card {
  padding: 2rem 1.75rem;
  border-radius: 16px;
  background: #1e293b;
  border: 1px solid #334155;
  text-align: center;
}

.cw-onboarding__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.cw-onboarding__text {
  margin: 0 0 1.5rem;
  color: #94a3b8;
  line-height: 1.5;
}

.cw-onboarding__welcome-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #d4af37;
  margin: 0 0 0.5rem;
}

.cw-onboarding__logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.cw-onboarding__logo-preview {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(212, 175, 55, 0.35);
}

.cw-onboarding__logo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  border: 2px dashed #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #64748b;
}

.cw-onboarding__form {
  text-align: left;
  margin-bottom: 1.5rem;
}

.cw-onboarding__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cw-small { font-size: 0.85rem; color: #94a3b8; }

/* ——— ИИ-помощник (создание заказа) ——— */
.ai-helper-button {
  margin-bottom: 1.25rem;
  text-align: center;
}

.btn-ai {
  background: linear-gradient(135deg, #8b5cf6, #d4af37);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  animation: ai-pulse 2s infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-ai:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

@keyframes ai-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
}

.btn-ai-helper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
}

.btn-ai-helper .icon {
  font-size: 1.1rem;
}

.btn-ai-helper small {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.9;
}

.ai-helper-button small {
  display: none;
}

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

.ai-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.ai-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
}

.ai-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: #1e293b;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 1.5rem 1.75rem 1.75rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.ai-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ai-modal__header h3 { margin: 0; font-size: 1.2rem; }

.ai-modal__close {
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.ai-modal__close:hover { color: #f8fafc; }

.ai-hint {
  color: #94a3b8;
  font-size: 0.88rem;
  margin: 0.35rem 0 0.75rem;
}

.ai-modal textarea {
  width: 100%;
  box-sizing: border-box;
  background: #0f172a;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 14px 16px;
  color: #f8fafc;
  font-size: 0.95rem;
  margin: 0.5rem 0 1rem;
  resize: vertical;
  min-height: 110px;
}

.ai-examples { margin: 0.75rem 0 1.25rem; }

.ai-examples__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ai-example-btn {
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.ai-example-btn:hover {
  border-color: rgba(212, 175, 55, 0.5);
  color: #d4af37;
}

.ai-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(139, 92, 246, 0.2);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: ai-spin 1s linear infinite;
  margin: 2rem auto 1rem;
}

@keyframes ai-spin { to { transform: rotate(360deg); } }

.ai-loading-text {
  text-align: center;
  color: #94a3b8;
}

.ai-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  font-size: 0.9rem;
  text-align: center;
}

.ai-recommendation {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid #8b5cf6;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 0.5rem 0 1rem;
}

.ai-recommendation h4 { margin: 0 0 0.75rem; }

.recommendation-block {
  margin: 0.65rem 0;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #d4af37;
}

.recommendation-block strong {
  color: #d4af37;
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}

.recommendation-block span,
.recommendation-block p {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.ai-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ai-question {
  color: #e2e8f0;
  margin: 0.75rem 0 1rem;
  font-size: 1rem;
}

.ai-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ai-option-btn { width: 100%; justify-content: center; }

.ai-step4-back { margin-top: 0.5rem; }

.ai-field-highlight {
  outline: 2px solid rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  transition: outline 0.3s, box-shadow 0.3s;
}

/* ——— ИИ-чат (диалоговый помощник) ——— */
.ai-chat .chat-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 70vh;
  max-height: 700px;
  background: #1e293b;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.chat-header {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

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

.ai-avatar {
  font-size: 32px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 50%;
}

.chat-header h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 18px;
}

.chat-header .status {
  color: #10b981;
  font-size: 12px;
}

.chat-header .close-btn {
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}

.chat-header .close-btn:hover { color: #f8fafc; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.message.user { align-self: flex-end; }
.message.ai { align-self: flex-start; }

.message-content {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.message.user .message-content {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.message.ai .message-content {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.message-time {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  padding: 0 4px;
}

.chat-input-area {
  padding: 16px 20px;
  background: #0f172a;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.chat-input-area textarea {
  flex: 1;
  background: #1e293b;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: #f8fafc;
  font-size: 14px;
  resize: none;
  font-family: inherit;
  min-height: 48px;
  margin: 0;
}

.chat-input-area textarea:focus {
  outline: none;
  border-color: #d4af37;
}

.send-btn {
  background: linear-gradient(135deg, #8b5cf6, #d4af37);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.quick-replies {
  padding: 12px 20px;
  background: #0f172a;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  flex-shrink: 0;
}

.quick-replies[hidden] { display: none !important; }

.quick-reply-btn {
  background: #1e293b;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #f8fafc;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-reply-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: #8b5cf6;
  transform: translateY(-1px);
}

.quick-reply-btn.primary {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
}

.typing-indicator {
  padding: 8px 20px 12px;
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.typing-indicator[hidden] { display: none !important; }

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #8b5cf6;
  border-radius: 50%;
  animation: ai-typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
}

@media (max-width: 768px) {
  .ai-chat .chat-container {
    width: 100%;
    height: 80vh;
    max-height: none;
  }

  .chat-input-area {
    flex-direction: column;
  }

  .send-btn { width: 100%; }
}

/* Стартовые кнопки в чате */
.initial-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
  max-width: 100%;
}

.initial-actions__title {
  margin: 0 0 0.35rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.initial-action-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: #0f172a;
  color: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.initial-action-btn:hover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.12);
}

.initial-action-btn__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.initial-action-btn__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.initial-action-btn__text strong {
  font-size: 0.9rem;
}

.initial-action-btn__text small {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 400;
}

/* ——— Private sections ——— */
.cw-private-section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.cw-private-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cw-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.cw-note-card {
  padding: 1rem;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #334155;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.cw-note-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.25);
}

.cw-note-card h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.cw-note-card p { margin: 0 0 0.75rem; color: #b8bcc8; font-size: 0.9rem; }

.cw-note-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.5rem;
}

.cw-note-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }

.cw-note-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: color-mix(in srgb, var(--tag-color) 20%, transparent);
  color: var(--tag-color);
}

.cw-note-card__edit {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 0.78rem;
  cursor: pointer;
}

.cw-note-card__edit:hover { color: #d4af37; }

.cw-templates-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.cw-template-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #334155;
  flex-wrap: wrap;
}

.cw-settings-block {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #334155;
}

.cw-settings-block h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.cw-danger-btn {
  margin-top: 1rem;
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
}

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

.cw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cw-table th,
.cw-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #334155;
}

.cw-table th {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.8rem;
}

.cw-badge {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.cw-badge--work { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.cw-badge--done { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.cw-badge--new { background: rgba(212, 175, 55, 0.15); color: #d4af37; }
.cw-badge--responses { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; }
.cw-badge--muted { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

@media (max-width: 768px) {
  .cw-type-grid,
  .cw-reg-fields,
  .cw-profile-grid,
  .cw-requisites-dl {
    grid-template-columns: 1fr;
  }

  .cw-requisites-dl { grid-template-columns: 1fr; }

  .cw-profile-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cw-profile-logo {
    width: 100px;
    height: 100px;
    font-size: 2rem;
  }

  .cw-profile-tabs {
    flex-direction: column;
    border-bottom: none;
  }

  .cw-profile-tab {
    border-bottom: none;
    border-left: 2px solid transparent;
    text-align: left;
  }

  .cw-profile-tab.active {
    border-left-color: #d4af37;
    border-bottom-color: transparent;
  }
}
