/* ========================================
   PROJECTS - GYANOGRAM
   Compatible with base design system
   ======================================== */


/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: #e9f2ff;
  color: #0f172a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== LAYOUT PRINCIPAL ===== */
.app {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 220px;
  background: #ffffff;
  box-shadow: 6px 0 30px rgba(15, 23, 42, 0.12);
  border-radius: 0 24px 24px 0;
  padding: 16px 14px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 8px 12px;
  margin-bottom: 20px;
}

.sidebar-logo img {
  width: 120px;
  display: block;
}

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

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, transform 0.05s ease;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #0f172a;
}

.nav-item--active {
  background: #1455e6;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(20, 85, 230, 0.4);
  transform: translateY(-1px);
}

.nav-item--group {
  font-weight: 600;
}

.nav-chevron {
  font-size: 12px;
  transition: transform 0.15s ease;
}

.nav-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  margin-top: 4px;
}

.nav-sub--open {
  display: flex;
}

.nav-sub-item {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-sub-item:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #0f172a;
}

.nav-sub-item--active {
  background: rgba(20, 85, 230, 0.08);
  color: #1455e6;
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1455e6, #1d5fff);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.user-meta {
  flex: 1;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.user-tag {
  font-size: 11px;
  color: #6b7280;
}

.logout-btn {
  width: 100%;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  background: rgba(148, 163, 184, 0.08);
  border: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* ===== MAIN CONTENT ===== */
.main {
  flex: 1;
  padding: 32px 28px;
  overflow-y: auto;
}

/* ===== FORUM HEADER ===== */
.forum-header {
  margin-bottom: 28px;
}

.forum-title h1 {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.forum-subcopy {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 720px;
}

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

.city-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-right: 4px;
}

.city-pill {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  background: rgba(148, 163, 184, 0.12);
  border: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, transform 0.05s ease;
}

.city-pill:hover {
  background: rgba(20, 85, 230, 0.08);
  color: #1455e6;
}

.city-pill--active {
  background: #1455e6;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(20, 85, 230, 0.35);
  transform: translateY(-1px);
}

/* ===== FORUM BODY (3 COLUMNAS) ===== */
.forum-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* ===== COLUMNA DE AMIGOS/LISTA ===== */
.friends-column {
  flex: 0 0 280px;
}

.friends-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
  padding: 16px;
}

.friends-header {
  margin-bottom: 14px;
}

.friends-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: block;
  margin-bottom: 4px;
}

.friends-subtitle {
  font-size: 12px;
  color: #6b7280;
  display: block;
}

.friends-search {
  position: relative;
  margin-bottom: 14px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #9ca3af;
}

.friends-search input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 13px;
  color: #0f172a;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.friends-search input::placeholder {
  color: #9ca3af;
}

.friends-search input:focus {
  outline: none;
  border-color: #1455e6;
  box-shadow: 0 0 0 3px rgba(20, 85, 230, 0.18);
  background: #ffffff;
}

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 500px;
  overflow-y: auto;
  margin-bottom: 14px;
}

.friend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.05s ease;
  text-align: left;
  width: 100%;
}

.friend-item:hover {
  background: rgba(148, 163, 184, 0.08);
  transform: translateY(-1px);
}

.project-item--active {
  background: rgba(20, 85, 230, 0.06);
  box-shadow: 0 2px 8px rgba(20, 85, 230, 0.12);
}

.friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1455e6, #1d5fff);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.friend-info {
  flex: 1;
  min-width: 0;
}

.friend-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-detail {
  font-size: 11px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-project-btn {
  width: 100%;
  margin-top: 8px;
}

/* ===== COLUMNA CENTRAL (CHAT/DETALLE) ===== */
.chat-column {
  flex: 1;
  min-width: 0;
}

.chat-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  margin-bottom: 18px;
}

.chat-channel-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.chat-channel-name {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.chat-channel-meta {
  font-size: 12px;
  color: #6b7280;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}

.project-tag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #1455e6;
  background: rgba(20, 85, 230, 0.08);
  white-space: nowrap;
}

/* ===== LAYOUT DE DETALLE DEL PROYECTO ===== */
.proj-detail-layout {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
}

.proj-detail-image {
  flex: 0 0 280px;
  height: 200px;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f4f6;
}

.proj-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proj-detail-info {
  flex: 1;
  min-width: 0;
}

.proj-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  margin-top: 16px;
}

.proj-section-title:first-child {
  margin-top: 0;
}

.proj-description {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 16px;
}

.proj-skills-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.proj-skills-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #4b5563;
}

.check-icon {
  color: #10b981;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.proj-leader-section {
  margin-top: 18px;
  margin-bottom: 18px;
}

.proj-leader-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  display: block;
  margin-bottom: 8px;
}

.proj-leader-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.proj-leader-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1455e6, #1d5fff);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.proj-leader-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.proj-leader-contact {
  font-size: 12px;
  color: #6b7280;
}

.proj-cta-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

/* ===== QUICK CARDS (NOTAS Y RESUMEN) ===== */
.proj-quick-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.proj-quick-card {
  background: #f9fafb;
  border-radius: 14px;
  padding: 14px;
}

.proj-quick-title {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 8px;
}

.proj-quick-text {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

/* ===== COLUMNA DERECHA (EQUIPO Y ACTUALIZACIONES) ===== */
.project-team-column {
  flex: 0 0 280px;
}

.proj-team-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.proj-team-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.05);
}

.proj-team-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1455e6, #1d5fff);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.proj-team-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.proj-team-role {
  font-size: 11px;
  color: #6b7280;
}

.proj-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.2);
  margin: 18px 0;
}

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

.proj-update {
  padding: 12px;
  border-radius: 12px;
  background: rgba(20, 85, 230, 0.03);
  border-left: 3px solid #1455e6;
}

.proj-update-date {
  font-size: 11px;
  font-weight: 600;
  color: #1455e6;
  margin-bottom: 6px;
}

.proj-update-text {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
}

/* ===== BOTONES PRIMARIOS Y SECUNDARIOS ===== */
.primary-btn {
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #1455e6, #1d5fff);
  box-shadow: 0 14px 32px rgba(20, 85, 230, 0.55);
  border: none;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(20, 85, 230, 0.6);
  filter: brightness(1.03);
}

.primary-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(20, 85, 230, 0.45);
}

.primary-btn--small {
  padding: 9px 18px;
  font-size: 13px;
}

.secondary-btn {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  background: rgba(148, 163, 184, 0.12);
  border: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.secondary-btn:hover {
  background: rgba(148, 163, 184, 0.18);
  color: #0f172a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .proj-detail-layout {
    flex-direction: column;
  }

  .proj-detail-image {
    flex: none;
    width: 100%;
    height: 220px;
  }

  .proj-quick-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .sidebar {
    display: none;
  }

  .main {
    padding: 20px 16px;
  }

  .forum-body {
    flex-direction: column;
  }

  .friends-column,
  .project-team-column {
    flex: none;
    width: 100%;
  }

  .chat-column {
    width: 100%;
  }

  .proj-detail-image {
    height: 200px;
  }

  .proj-cta-row {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }
}