/* Lupiapps — client project portal */
.page-portal { background: var(--paper, #F3F4F6); }
.portal-main { padding: clamp(40px, 7vw, 96px) 20px 80px; min-height: 70vh; }

/* ===== Login ===== */
.portal-login { max-width: 460px; margin: 0 auto; }
.portal-login-card {
  background: #fff;
  border: 1px solid var(--line, #D8DAE0);
  border-radius: 18px;
  padding: 36px 32px 30px;
  box-shadow: 0 12px 40px -16px rgba(11,14,20,.08);
}
.portal-tag {
  display: inline-block;
  font-family: var(--font-mono, JetBrains Mono, monospace);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2, #6B6F7A);
  background: var(--paper, #F3F4F6);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.portal-login-card h1 {
  font-family: var(--font-display, Inter Tight, system-ui);
  font-size: clamp(26px, 3.5vw, 32px);
  margin: 0 0 10px;
  letter-spacing: -.01em;
}
.portal-login-card h1 em {
  font-style: italic;
  color: var(--accent, #1E3FA8);
  font-weight: 500;
}
.portal-lede {
  margin: 0 0 22px;
  color: var(--ink-2, #6B6F7A);
  font-size: 14.5px;
  line-height: 1.6;
}
.portal-form { display: flex; flex-direction: column; gap: 14px; }
.portal-label { display: flex; flex-direction: column; gap: 6px; }
.portal-label > span {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2, #6B6F7A);
  font-weight: 500;
}
.portal-label input {
  background: var(--paper, #F3F4F6);
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink, #0B0E14);
  transition: border-color .14s ease, background .14s ease;
}
.portal-label input:focus {
  outline: none;
  border-color: var(--accent, #1E3FA8);
  background: #fff;
}
.portal-label input#pfCode {
  font-family: var(--font-mono, JetBrains Mono, monospace);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 17px;
}
.portal-err {
  background: #FEF2F2;
  color: #B42318;
  border: 1px solid #FECDCA;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
}
.portal-submit { margin-top: 6px; width: 100%; justify-content: center; }
.portal-help {
  margin: 14px 0 0;
  color: var(--ink-2, #6B6F7A);
  font-size: 12.5px;
  line-height: 1.6;
}
.portal-help a { color: var(--accent, #1E3FA8); text-decoration: none; }
.portal-help a:hover { text-decoration: underline; }

/* ===== Project view ===== */
.portal-view { max-width: 1080px; margin: 0 auto; }
.portal-view-head {
  margin-bottom: 32px;
}
.pv-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pv-back {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink-2, #6B6F7A);
  text-decoration: none;
}
.pv-back:hover { color: var(--ink, #0B0E14); }
.pv-id {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-3, #A8ACB6);
  text-transform: uppercase;
}
.pv-title-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 6px;
}
.pv-title-row h1 {
  font-family: var(--font-display, Inter Tight, system-ui);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -.02em;
  margin: 0;
  flex: 1;
  min-width: 200px;
  line-height: 1.1;
}
.pv-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #E8EDFB;
  color: var(--accent, #1E3FA8);
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}
.pv-status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.pv-status.s-completed { background: #DCFCE7; color: #166534; }
.pv-status.s-live       { background: #DBEAFE; color: #1E40AF; }
.pv-status.s-testing    { background: #FEF3C7; color: #92400E; }
.pv-status.s-development { background: #E0E7FF; color: #3730A3; }
.pv-status.s-design     { background: #FCE7F3; color: #9D174D; }
.pv-status.s-planning   { background: #F3F4F6; color: #6B6F7A; }
.pv-owner {
  margin: 4px 0 24px;
  color: var(--ink-2, #6B6F7A);
  font-size: 14px;
}

/* progress bar */
.pv-progress {
  background: #fff;
  border: 1px solid var(--line, #D8DAE0);
  border-radius: 14px;
  padding: 20px 24px 16px;
}
.pv-progress-bar {
  position: relative;
  height: 4px;
  background: var(--paper, #F3F4F6);
  border-radius: 999px;
  margin-bottom: 14px;
}
.pv-progress-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #2D58D6, #0F1F4D);
  border-radius: 999px;
  transition: width .5s ease;
  width: 0%;
}
.pv-progress-steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.pv-progress-steps li {
  font-size: 11px;
  text-align: center;
  color: var(--ink-3, #A8ACB6);
  padding-top: 4px;
  font-family: var(--font-mono, monospace);
  letter-spacing: .04em;
}
.pv-progress-steps li.done   { color: var(--accent, #1E3FA8); font-weight: 600; }
.pv-progress-steps li.active { color: var(--ink, #0B0E14); font-weight: 600; }
@media (max-width: 640px) {
  .pv-progress-steps { grid-template-columns: repeat(3, 1fr); }
  .pv-progress-steps li:nth-child(n+4) { display: none; }
}

/* layout */
.portal-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}
@media (max-width: 880px) {
  .portal-grid { grid-template-columns: 1fr; }
}
.pv-card {
  background: #fff;
  border: 1px solid var(--line, #D8DAE0);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
}
.pv-card h3 {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2, #6B6F7A);
  margin: 0 0 14px;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
}
.pv-dl { margin: 0; display: grid; gap: 10px; }
.pv-dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.pv-dl span { color: var(--ink-2, #6B6F7A); }
.pv-dl b { color: var(--ink, #0B0E14); font-weight: 500; text-align: right; }
.pv-help-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.pv-help-card .btn + .btn { margin-top: 6px; }
.pv-desc { margin: 0; line-height: 1.7; color: var(--ink, #0B0E14); white-space: pre-wrap; font-size: 14.5px; }

/* timeline */
.pv-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pv-timeline-head h3 { margin: 0; }
.pv-count {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--ink-3, #A8ACB6);
  letter-spacing: .08em;
}
.pv-timeline {
  list-style: none;
  margin: 0; padding: 0;
  position: relative;
}
.pv-timeline::before {
  content: "";
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--line, #D8DAE0), transparent);
}
.pv-tl-item {
  position: relative;
  padding-left: 30px;
  padding-bottom: 22px;
}
.pv-tl-item:last-child { padding-bottom: 0; }
.pv-tl-item::before {
  content: "";
  position: absolute;
  left: 4px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--accent, #1E3FA8);
}
.pv-tl-item.milestone::before {
  background: var(--accent, #1E3FA8);
  box-shadow: 0 0 0 4px #E8EDFB;
}
.pv-tl-date {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-3, #A8ACB6);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pv-tl-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink, #0B0E14);
  margin: 0 0 6px;
  letter-spacing: -.005em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pv-tl-milestone {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #166534;
  background: #DCFCE7;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}
.pv-tl-body {
  margin: 0;
  color: var(--ink-2, #2A2E3A);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.pv-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-2, #6B6F7A);
  font-size: 14px;
  background: var(--paper, #F3F4F6);
  border-radius: 10px;
}
