/* ══════════════════════════════════════════════
   Project Page — Corporate Edition
   ══════════════════════════════════════════════ */

/* ── Project Hero ── */
.project-hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.project-hero-inner {
  padding: 32px 32px 28px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 20px;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: color var(--duration) var(--ease);
}

.back-link:hover { color: var(--accent-blue); }

/* Project title row — no giant serif, proper corporate heading */
.project-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.project-icon-large {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-blue);
  border: none;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.025em;
  line-height: 1.2;
  text-transform: capitalize;
}

.project-desc {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

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

/* ── Stats Row ── */
.stats-row {
  display: flex;
  gap: 10px;
}

.stat-card {
  background: var(--bg-base);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  min-width: 86px;
  text-align: left;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.stat-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(29,78,216,.07);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -.02em;
}

.stat-label {
  font-size: .69rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Similar Projects Panel ── */
.similar-panel {
  border-left: 1px solid var(--border-light);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
}

.similar-panel-header {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.similar-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
}

.similar-empty p {
  font-size: .79rem;
  text-align: center;
  line-height: 1.5;
}

/* ── Tabs ── */
.tabs-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 32px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px 12px;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--duration) var(--ease);
  margin-bottom: -1px;
}

.tab:hover { color: var(--text-primary); }

.tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  font-weight: 600;
}

.tab-count {
  background: var(--accent-blue-mid);
  color: var(--accent-blue);
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: .02em;
}

/* ── Tab panels ── */
.tab-panel {
  display: none;
  padding: 28px 32px 48px;
}

.tab-panel.active { display: block; }

/* ── Docs toolbar ── */
.docs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.docs-count-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.count-badge {
  background: var(--bg-base);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: .03em;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: .76rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Document Table ── */
.docs-table {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.docs-table-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) 80px 130px 70px 105px 130px 148px;
  gap: 0;
  padding: 10px 18px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-light);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

.doc-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 80px 130px 70px 105px 130px 148px;
  gap: 0;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  transition: background var(--duration) var(--ease);
  animation: rowIn .3s var(--ease) both;
}

.doc-row:last-child { border-bottom: none; }
.doc-row:hover { background: #F7F9FC; }

@keyframes rowIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.doc-row:nth-child(2) { animation-delay: .04s; }
.doc-row:nth-child(3) { animation-delay: .08s; }

/* columns */
.col-file {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.file-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.file-icon.pdf {
  background: #FEE2E2;
  color: #B91C1C;
}

.file-icon.docx {
  background: var(--accent-blue-mid);
  color: var(--accent-blue);
}

.file-meta { min-width: 0; }

.file-name {
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color var(--duration) var(--ease);
}

.file-name:hover { color: var(--accent-blue); }

.file-path {
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.col-type, .col-status, .col-size, .col-uploaded, .col-by, .col-actions {
  font-size: .81rem;
  color: var(--text-secondary);
}

.col-size { font-family: var(--font-mono); font-size: .76rem; }
.col-uploaded { font-size: .78rem; }

/* ── Activity list ── */
.activity-list {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  max-width: 680px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-light);
  animation: rowIn .3s var(--ease) both;
}

.activity-item:last-child { border-bottom: none; }
.activity-item:nth-child(1) { animation-delay: .04s; }
.activity-item:nth-child(2) { animation-delay: .08s; }
.activity-item:nth-child(3) { animation-delay: .12s; }
.activity-item:nth-child(4) { animation-delay: .16s; }
.activity-item:nth-child(5) { animation-delay: .20s; }

.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.approved { background: var(--accent-teal); }
.activity-dot.upload   { background: var(--accent-blue); }
.activity-dot.create   { background: var(--accent-slate); }

.activity-body {
  font-size: .83rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.activity-actor {
  font-weight: 600;
  color: var(--text-primary);
}

.activity-target {
  font-family: var(--font-mono);
  font-size: .79rem;
  color: var(--accent-blue);
  background: var(--accent-blue-light);
  padding: 1px 5px;
  border-radius: 3px;
}

.activity-time {
  font-size: .73rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Page entry animation ── */
.project-hero,
.tabs-bar {
  animation: heroIn .35s var(--ease) both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive tweaks ── */
@media (max-width: 900px) {
  .project-hero {
    grid-template-columns: 1fr;
  }

  .similar-panel {
    border-left: none;
    border-top: 1px solid var(--border-light);
    padding: 20px 32px;
  }

  .docs-table-head,
  .doc-row {
    grid-template-columns: minmax(0,1fr) 80px 120px 110px;
  }

  .col-size,
  .col-uploaded,
  .col-by { display: none; }

  .stats-row { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .main-content { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .25s var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 0 16px; }
  .project-hero-inner { padding: 20px 16px; }
  .tab-panel { padding: 16px 16px 40px; }
  .tabs-bar { padding: 0 16px; }
}
