/* ============================================================
   portal.css — client project portal
   ============================================================ */

.pnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem clamp(1.1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 8, 10, 0.8);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.pwrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.2rem, 3.5vw, 2.6rem) clamp(1.1rem, 4vw, 2.5rem) 4rem;
}

.phead { margin-bottom: 1.8rem; }
.phead .hud { margin-bottom: 0.7rem; }
.phead h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.4vw, 2.3rem);
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
  line-height: 1.1;
}

/* pipeline tracker */
.tracker {
  display: flex;
  align-items: center;
  margin: 1.8rem 0 2.2rem;
}
.tracker .node { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; min-width: 0; }
.tracker .dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg-2);
  transition: all 0.4s var(--ease);
}
.tracker .node.done .dot { background: var(--gold); border-color: var(--gold); }
.tracker .node.now .dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 5px var(--gold-soft);
  animation: nodepulse 2s ease-in-out infinite;
}
@keyframes nodepulse { 50% { box-shadow: 0 0 0 9px rgba(233, 185, 73, 0.05); } }
.tracker .node span {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}
.tracker .node.done span, .tracker .node.now span { color: var(--gold); }
.tracker .link { flex: 1; height: 2px; background: var(--line); margin: 0 0.4rem 1.45rem; }
.tracker .link.done { background: var(--gold); }

/* layout */
.pgrid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1.4rem;
  align-items: start;
}
@media (max-width: 980px) { .pgrid { grid-template-columns: 1fr; } }

.pcard {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  padding: 1.5rem;
  margin-bottom: 1.4rem;
}
.pcard h2 {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.2rem;
}
.pcard h2 b { color: var(--gold); font-weight: 500; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.kv div span { display: block; font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.3rem; }
.kv div strong { font-weight: 600; font-size: 0.97rem; }

/* invoices */
.inv {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  transition: border-color 0.3s var(--ease);
}
.inv:hover { border-color: var(--line); }
.inv .inv-amt { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.inv .inv-t { font-size: 0.92rem; font-weight: 600; }
.inv .inv-li { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }
.inv .btn { padding: 0.6em 1.5em; font-size: 0.88rem; }

/* files */
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
  gap: 1rem;
}
.file-row:last-child { border-bottom: 0; }
.file-row a { font-weight: 600; font-size: 0.95rem; }

/* messages */
.chat { display: flex; flex-direction: column; height: 560px; }
.chat-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.7rem; padding-right: 0.3rem; }
.msg { max-width: 82%; padding: 0.75rem 1rem; border-radius: 14px; font-size: 0.94rem; line-height: 1.5; }
.msg time { display: block; font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.12em; color: var(--faint); margin-top: 0.4rem; text-transform: uppercase; }
.msg.studio { align-self: flex-start; background: var(--bg-3); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; }
.msg.client { align-self: flex-end; background: var(--gold-soft); border: 1px solid rgba(233, 185, 73, 0.3); border-bottom-right-radius: 4px; }
.chat-empty { color: var(--faint); font-size: 0.9rem; text-align: center; margin: auto; }
.chat-form { display: flex; gap: 0.6rem; margin-top: 1rem; }
.chat-form textarea {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75em 1em;
  resize: none;
  min-height: 48px;
  max-height: 130px;
}
.chat-form textarea:focus { outline: none; border-color: var(--gold); }
.chat-form .btn { align-self: flex-end; padding: 0.72em 1.4em; }

/* banners + empty states */
.banner {
  border: 1px solid rgba(87, 217, 163, 0.4);
  background: rgba(87, 217, 163, 0.08);
  color: var(--green);
  padding: 0.95rem 1.2rem;
  border-radius: 10px;
  font-size: 0.93rem;
  margin-bottom: 1.6rem;
}
.pempty {
  max-width: 460px;
  margin: 14vh auto;
  text-align: center;
  padding: 0 1.2rem;
}
.pempty h1 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.5rem; }
.pempty p { color: var(--muted); }
.skel { color: var(--faint); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; text-align: center; padding: 16vh 0; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
