/**
 * Рабочая зона AS-PRO: hub-колонки + панели без сайдбара.
 */
.app-shell.workspace-shell {
  display: flex;
  flex-direction: column;
}

.workspace-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 40% at 50% -10%, #0f172a 0%, #030617 55%);
}

.workspace-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(100, 150, 255, 0.12);
  background: rgba(8, 14, 26, 0.92);
  backdrop-filter: blur(10px);
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  cursor: pointer;
}

.workspace-brand:hover .workspace-brand-title {
  color: #93c5fd;
}

.workspace-brand-icon {
  font-size: 1.75rem;
  color: #60a5fa;
  flex-shrink: 0;
}

.workspace-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(95deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: color 0.2s;
}

.workspace-brand-tagline {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.workspace-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.workspace-fx {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: right;
  max-width: 280px;
}

.workspace-fx strong {
  color: #e2e8f0;
}

.workspace-account {
  font-size: 0.85rem;
  color: #67e8f9;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(103, 232, 249, 0.25);
  white-space: nowrap;
}

.workspace-account:hover {
  background: rgba(103, 232, 249, 0.08);
}

/* Навигация-колонки */
.workspace-nav {
  flex-shrink: 0;
  display: flex;
  width: 100%;
  border-bottom: 1px solid rgba(100, 150, 255, 0.1);
  transition: min-height 0.35s ease;
}

/* Компактный стек платформы (по умолчанию на /app) */
.workspace-nav--compact .workspace-col {
  min-height: 2.75rem;
  max-height: 2.75rem;
  padding: 0.45rem 0.85rem;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.workspace-nav--compact .workspace-col-title {
  font-size: 0.95rem;
  margin-bottom: 0;
  white-space: nowrap;
}

.workspace-nav--compact .workspace-col-desc {
  display: block;
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.35;
  transition: opacity 0.25s ease, max-height 0.3s ease, margin 0.25s ease;
}

.workspace-nav--compact .workspace-col:hover {
  min-height: 4.5rem;
  max-height: 6.5rem;
  align-items: flex-start;
  text-align: left;
  z-index: 4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.workspace-nav--compact .workspace-col.is-active {
  min-height: 2.75rem;
  max-height: 2.75rem;
}

.workspace-nav--compact .workspace-col:hover .workspace-col-desc {
  opacity: 1;
  max-height: 3.5rem;
  margin-top: 0.35rem;
}

.workspace-nav--compact .workspace-col.is-active .workspace-col-desc {
  opacity: 0;
  max-height: 0;
  margin: 0;
}

.workspace-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  padding: 1.25rem 1rem;
  min-height: 42vh;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition:
    flex 0.35s ease,
    min-height 0.35s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.workspace-col:last-child {
  border-right: none;
}

.workspace-col::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(59, 130, 246, 0.06) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.workspace-col:hover::before,
.workspace-col.is-active::before {
  opacity: 1;
}

.workspace-col:hover {
  background: rgba(30, 58, 95, 0.35);
  box-shadow: inset 0 -3px 0 rgba(139, 124, 248, 0.6);
}

.workspace-nav--compact .workspace-col:hover {
  transform: none;
}

.workspace-col.is-active {
  background: rgba(30, 58, 95, 0.5);
  box-shadow: inset 0 -3px 0 #8b7cf8;
}

.workspace-col-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.workspace-col-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #94a3b8;
  position: relative;
  z-index: 1;
  transition: opacity 0.3s, max-height 0.35s;
}

.workspace-col--objects .workspace-col-title {
  color: #6ee7b7;
}

.workspace-col--outreach .workspace-col-title {
  color: #fbbf24;
}

.workspace-col.is-hidden {
  display: none;
}

/* Компактный режим при открытой панели — фиксированная высота, без «дрожи» */
.workspace-shell.panel-open .workspace-col {
  min-height: 2.75rem;
  max-height: 2.75rem;
  padding: 0.45rem 0.85rem;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.workspace-shell.panel-open .workspace-nav--compact .workspace-col:hover {
  min-height: 2.75rem;
  max-height: 2.75rem;
  box-shadow: inset 0 -2px 0 rgba(139, 124, 248, 0.75);
}

.workspace-shell.panel-open .workspace-col-desc {
  display: none;
}

.workspace-shell.panel-open .workspace-col-title {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Контент панелей */
.workspace-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template: 1fr / 1fr;
}

.workspace-panel {
  grid-area: 1 / 1;
  overflow-y: auto;
  padding: 1rem 1.25rem 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  transition: opacity 0.18s ease;
}

.workspace-panel.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#panel-projects.is-visible {
  overflow: hidden;
}

#panel-projects #projectsListView {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.workspace-panel iframe {
  width: 100%;
  height: calc(100dvh - 11rem);
  min-height: 400px;
  border: none;
  border-radius: 0.75rem;
  background: transparent;
}

.workspace-projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.neo-btn--new-project {
  order: -1;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.35), rgba(16, 185, 129, 0.25)) !important;
  border: 1px solid rgba(74, 222, 128, 0.55) !important;
  color: #ecfdf5 !important;
  font-weight: 600;
}
.neo-btn--new-project:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.5), rgba(16, 185, 129, 0.4)) !important;
  border-color: rgba(134, 239, 172, 0.75) !important;
}

.project-kind-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-kind-tab {
  border: none;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  color: rgba(148, 163, 184, 0.95);
  background: transparent;
  transition: color 0.15s, background 0.15s;
}

.project-kind-tab:hover {
  color: #e2e8f0;
}

.project-kind-tab.is-active {
  color: #f8fafc;
  background: rgba(56, 189, 248, 0.22);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.project-kind-tab__icon {
  margin-right: 0.35rem;
  opacity: 0.85;
}

.workspace-tender-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.projects-detail-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.projects-detail-view.hidden {
  display: none !important;
}

#projectsListView.hidden {
  display: none !important;
}

.projects-back-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.projects-back-btn:hover {
  color: #e2e8f0;
  border-color: rgba(96, 165, 250, 0.5);
}

.projects-detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.project-card {
  position: relative;
  padding: 1.1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid rgba(100, 150, 255, 0.22);
  background: rgba(15, 25, 45, 0.55);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.25s, border-color 0.2s;
  text-align: left;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
}

.project-card--ready {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.12), inset 0 0 0 1px rgba(34, 197, 94, 0.08);
}

.project-card--ready:hover {
  border-color: rgba(74, 222, 128, 0.7);
  box-shadow: 0 0 32px rgba(34, 197, 94, 0.22);
}

.project-card--analyzed {
  border-color: rgba(45, 212, 191, 0.4);
}

.project-card--draft {
  border-color: rgba(148, 163, 184, 0.35);
}

.project-card--empty {
  opacity: 0.92;
  border-style: dashed;
  border-color: rgba(100, 116, 139, 0.45);
}

.project-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #93c5fd;
  line-height: 1.3;
  padding-right: 3.5rem;
}

.project-card--ready .project-card__title {
  color: #bbf7d0;
}

.project-card__meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.project-card__hint {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.65rem;
  line-height: 1.4;
}

.project-card__actions {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: flex;
  gap: 0.25rem;
}

.project-card__icon-btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.4rem;
  background: rgba(15, 23, 42, 0.7);
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.8rem;
}

.project-card__icon-btn:hover {
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.9);
}

.project-card__icon-btn--danger:hover {
  color: #fca5a5;
}

@media (max-width: 768px) {
  .workspace-nav {
    flex-wrap: wrap;
  }
  .workspace-col {
    flex: 1 1 45%;
    min-height: 28vh;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  }
  .workspace-shell.panel-open .workspace-col {
    flex: 1 1 auto;
    min-height: 2.75rem;
  }
  .workspace-brand-tagline {
    display: none;
  }
}
