/* ============================================================
   EDISON TECH — Portal de Clientes
   Estilos compartidos entre portal/index.html y portal/dashboard.html
   ============================================================ */

/* ── Base del portal (dark por defecto) ── */
.portal-body {
  background: var(--navy-dark);
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--white);
  overflow-x: hidden;
}

/* ════════════════════════════════════════════════════════
   PORTAL LOGIN PAGE (portal/index.html)
════════════════════════════════════════════════════════ */

.portal-login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  /* Circuit background pattern */
  background: linear-gradient(135deg, var(--navy-dark) 0%, #0d2035 100%);
  background-image:
    linear-gradient(135deg, var(--navy-dark) 0%, #0d2035 100%),
    linear-gradient(rgba(116,167,199,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116,167,199,0.06) 1px, transparent 1px);
  background-size: 100%, 60px 60px, 60px 60px;
  overflow: hidden;
}

/* Ambient glow orbs */
.portal-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.portal-orb-1 {
  width: 400px; height: 400px;
  background: rgba(116,167,199,0.12);
  top: -80px; right: -60px;
}
.portal-orb-2 {
  width: 300px; height: 300px;
  background: rgba(200,153,56,0.1);
  bottom: -40px; left: -40px;
}

/* Login card */
.portal-login-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 3rem 3.5rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.35), 0 0 0 1px rgba(200,153,56,0.08);
  animation: card-appear 0.6s cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes card-appear {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.portal-login-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 1.6rem;
  filter: drop-shadow(0 0 16px rgba(200,153,56,0.4));
}

.portal-login-card h1 {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.portal-login-card .portal-subtitle {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Login button */
.btn-portal-login {
  width: 100%;
  justify-content: center;
  padding: 0.95rem;
  font-size: 1rem;
  border-radius: var(--radius);
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
}

.btn-portal-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn-portal-login:hover::after { transform: translateX(100%); }

.portal-login-disclaimer {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  margin-top: 1.2rem;
}

/* Divider */
.portal-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.portal-divider::before,
.portal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}
.portal-divider span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}

/* Back to website link */
.portal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  margin-top: 1.5rem;
  transition: color var(--transition);
}
.portal-back-link:hover { color: var(--gold); }

/* Features list on login page */
.portal-features {
  margin: 1.8rem 0 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.portal-feature-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}
.portal-feature-item i {
  color: var(--gold);
  font-size: 0.8rem;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

/* Loading spinner on login page */
.portal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}
.portal-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(200,153,56,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ════════════════════════════════════════════════════════
   PORTAL DASHBOARD (portal/dashboard.html)
════════════════════════════════════════════════════════ */

/* ── Topbar ── */
.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: rgba(15, 37, 64, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  padding: 0 2rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.topbar-logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}
.topbar-logo span {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
}
.topbar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-mid), var(--blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
  text-transform: uppercase;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.03em;
}
.btn-logout:hover {
  border-color: rgba(200,153,56,0.4);
  color: var(--gold);
  background: rgba(200,153,56,0.08);
}

/* ── Dashboard main ── */
.portal-main {
  min-height: calc(100vh - 64px);
  padding: 2.5rem 2rem 4rem;
  background:
    linear-gradient(180deg, rgba(15,37,64,0) 0%, rgba(9,20,35,0.5) 100%),
    var(--navy-dark);
  background-image:
    linear-gradient(180deg, rgba(15,37,64,0) 0%, rgba(9,20,35,0.5) 100%),
    linear-gradient(rgba(116,167,199,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116,167,199,0.03) 1px, transparent 1px);
  background-size: 100%, 80px 80px, 80px 80px;
}

.portal-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Greeting header */
.dashboard-greeting {
  margin-bottom: 2.5rem;
}
.dashboard-greeting .greeting-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.3rem;
}
.dashboard-greeting h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--white);
  margin-bottom: 0.2rem;
}
.dashboard-greeting p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
}

/* ── Project cards grid ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* ── Project card ── */
.project-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--yellow));
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  border-color: rgba(200,153,56,0.25);
  background: rgba(255,255,255,0.06);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.project-card:hover::before { opacity: 1; }

/* Card header */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.card-project-name {
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--white);
  font-weight: 700;
  line-height: 1.3;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.75rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}
.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-in_progress  { background: rgba(200,153,56,0.15);  color: #e0b355; border: 1px solid rgba(200,153,56,0.3); }
.status-testing      { background: rgba(116,167,199,0.15); color: #74A7C7; border: 1px solid rgba(116,167,199,0.3); }
.status-active       { background: rgba(34,197,94,0.12);   color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.status-paused       { background: rgba(160,160,160,0.12); color: #A0A0A0; border: 1px solid rgba(160,160,160,0.3); }
.status-completed    { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.15); }

/* Progress bar */
.card-progress-wrap {
  margin-bottom: 1.4rem;
}
.card-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.card-progress-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.card-progress-pct {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--yellow));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.progress-bar-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0;
  width: 20px; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  animation: shimmer 2s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 0; }
  50%       { opacity: 1; }
}

/* Phase timeline */
.card-phases {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.4rem;
}

.phase-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.phase-step-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.15);
  margin: 0 auto 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: transparent;
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.phase-step.done .phase-step-dot {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}
.phase-step.active .phase-step-dot {
  background: rgba(200,153,56,0.2);
  border-color: var(--gold);
  border-width: 2px;
  box-shadow: 0 0 0 4px rgba(200,153,56,0.15);
}

.phase-step-label {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.03em;
  line-height: 1.3;
}
.phase-step.done  .phase-step-label { color: rgba(200,153,56,0.7); }
.phase-step.active .phase-step-label { color: var(--gold); font-weight: 600; }

/* Connector line between steps */
.phase-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 9px;
  left: calc(50% + 10px);
  right: calc(-50% + 10px);
  height: 1.5px;
  background: rgba(255,255,255,0.1);
}
.phase-step.done:not(:last-child)::after {
  background: var(--gold);
  opacity: 0.5;
}

/* Card footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.card-updated {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.card-updated i { font-size: 0.7rem; }

/* Team note */
.card-note {
  background: rgba(200,153,56,0.06);
  border: 1px solid rgba(200,153,56,0.15);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.card-note i {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 0.15rem;
  font-size: 0.78rem;
}

/* ── Skeleton loading ── */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
}
.skeleton-title    { height: 1rem; width: 65%; margin-bottom: 1.4rem; }
.skeleton-badge    { height: 1.4rem; width: 30%; border-radius: 50px; margin-bottom: 1.6rem; }
.skeleton-bar      { height: 6px; width: 100%; margin-bottom: 1.6rem; border-radius: 3px; }
.skeleton-phases   { height: 3rem; width: 100%; margin-bottom: 1.2rem; border-radius: 8px; }
.skeleton-footer   { height: 0.7rem; width: 40%; }

/* ── Empty state ── */
.portal-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255,255,255,0.4);
  grid-column: 1 / -1;
}
.portal-empty-state i {
  font-size: 3rem;
  color: rgba(200,153,56,0.3);
  margin-bottom: 1rem;
  display: block;
}
.portal-empty-state h3 {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
}
.portal-empty-state p {
  font-size: 0.88rem;
  max-width: 360px;
  margin: 0 auto 1.5rem;
  line-height: 1.65;
}

/* ── Error state ── */
.portal-error-state {
  grid-column: 1 / -1;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-align: center;
  color: #fca5a5;
  font-size: 0.9rem;
}
.portal-error-state i { margin-right: 0.4rem; }

/* ── Portal footer ── */
.portal-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.portal-footer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}
.portal-footer a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.portal-footer a:hover { color: var(--gold); }

/* ══════════════════════════════════════════════════════════
   AVATAR DROPDOWN
══════════════════════════════════════════════════════════ */
.topbar-user {
  position: relative;
}

.topbar-user-avatar {
  cursor: pointer;
  user-select: none;
}
.topbar-user-avatar:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(15, 37, 64, 0.98);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  min-width: 200px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}
.user-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.user-dropdown-name {
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown-email {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════
   STATS BANNER
══════════════════════════════════════════════════════════ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.stat-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  text-align: center;
  transition: var(--transition);
}
.stat-box:hover {
  border-color: rgba(200,153,56,0.2);
  background: rgba(255,255,255,0.06);
}
.stat-number {
  display: block;
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  display: block;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════════════════════
   FILTER TABS
══════════════════════════════════════════════════════════ */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-tab {
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.02em;
}
.filter-tab:hover {
  border-color: rgba(200,153,56,0.35);
  color: rgba(200,153,56,0.8);
}
.filter-tab.active {
  background: rgba(200,153,56,0.12);
  border-color: rgba(200,153,56,0.5);
  color: var(--gold);
}

/* Filter empty state */
.filter-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 3rem 1rem;
  color: rgba(255,255,255,0.3);
  font-size: 0.88rem;
}
.filter-empty i {
  font-size: 2rem;
  color: rgba(200,153,56,0.25);
}

/* Card detail hint */
.card-detail-hint {
  font-size: 0.72rem;
  color: rgba(200,153,56,0.5);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition);
}
.project-card:hover .card-detail-hint {
  color: var(--gold);
}
.project-card {
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════
   MODAL DE DETALLE
══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(9, 20, 35, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-card {
  position: relative;
  background: #0e2540;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.3s ease;
}

/* Scrollbar sutil */
.modal-card::-webkit-scrollbar { width: 4px; }
.modal-card::-webkit-scrollbar-track { background: transparent; }
.modal-card::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding-right: 2.5rem;
}
.modal-project-title {
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.modal-progress-big {
  text-align: right;
  flex-shrink: 0;
}
.modal-pct {
  display: block;
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.modal-pct-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.6rem;
}

.modal-description {
  margin-bottom: 1.6rem;
}
.modal-description h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.modal-description p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
}

.modal-progress-section {
  margin-bottom: 1.6rem;
}

.modal-phase-section {
  margin-bottom: 1.6rem;
}

.modal-note {
  background: rgba(200,153,56,0.07);
  border: 1px solid rgba(200,153,56,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}
.modal-note > i {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 0.15rem;
  font-size: 0.9rem;
}
.modal-note strong {
  display: block;
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.modal-note p {
  font-size: 0.86rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

.modal-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.modal-close-btn {
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
}
.modal-close-btn:hover {
  border-color: rgba(255,255,255,0.3);
  color: var(--white);
}

/* ══════════════════════════════════════════════════════════
   SECCIÓN AGENTES IA
══════════════════════════════════════════════════════════ */
.agents-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.agents-header {
  margin-bottom: 1.8rem;
}
.agents-section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}
.agents-header h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--white);
  margin-bottom: 0.3rem;
}
.agents-subtitle {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.35);
  max-width: 480px;
  line-height: 1.55;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.agent-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: var(--transition);
}
.agent-card:hover {
  border-color: rgba(200,153,56,0.2);
  background: rgba(255,255,255,0.05);
}

.agent-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(200,153,56,0.15), rgba(200,153,56,0.05));
  border: 1px solid rgba(200,153,56,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1rem;
  flex-shrink: 0;
}

.agent-info { flex: 1; min-width: 0; }
.agent-name {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.agent-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.55;
}

.agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4ade80;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.agent-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* ── Navbar portal link ── */
.navbar-portal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(116,167,199,0.12);
  border: 1px solid rgba(116,167,199,0.25);
  color: rgba(255,255,255,0.75) !important;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  transition: var(--transition);
}
.navbar-portal-link::after { display: none !important; }
.navbar-portal-link:hover {
  background: rgba(116,167,199,0.2);
  border-color: var(--blue-light);
  color: var(--white) !important;
}
.navbar-portal-link i { font-size: 0.72rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .portal-login-card { padding: 2rem 1.5rem; }
  .portal-main { padding: 1.5rem 1rem 3rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .portal-topbar { padding: 0 1rem; }
  .topbar-logo span { display: none; }
  .portal-footer { flex-direction: column; text-align: center; }

  .stats-bar { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
  .stat-box  { padding: 0.9rem 0.6rem; }

  .filter-tabs { gap: 0.4rem; }
  .filter-tab  { font-size: 0.75rem; padding: 0.38rem 0.8rem; }

  .modal-card  { padding: 1.6rem 1.2rem; }
  .modal-header { flex-direction: column; gap: 0.6rem; }
  .modal-progress-big { text-align: left; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { justify-content: center; }

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