/* ── Portal styles — extends theme.css ── */

.portal-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 48px 80px;
}

/* Pipeline Banner */
.pipeline-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 8px;
  margin-bottom: 40px;
  font-size: 14px;
  font-weight: 500;
}
.pipeline--setup   { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(245,166,35,0.25); }
.pipeline--active   { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.pipeline--review   { background: rgba(245,166,35,0.12); color: var(--accent); border: 1px solid rgba(245,166,35,0.2); }
.pipeline--done    { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }

.pipeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.pipeline-dot--pulse {
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Brief Section */
.brief-section {
  margin-top: 32px;
}
.brief-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.brief-card-header {
  margin-bottom: 28px;
}
.brief-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 8px;
}
.brief-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.brief-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Form */
.brief-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.form-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text-primary);
  width: 100%;
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
}
.form-input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}
.form-textarea {
  resize: vertical;
  min-height: 100px;
}
.form-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: #0B1320;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }

.btn-accent {
  background: var(--accent);
  color: #0B1320;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-accent:hover { opacity: 0.85; }
.btn-sm { font-size: 13px; padding: 8px 16px; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.btn-ghost:hover { color: var(--cream); border-color: rgba(246,240,232,0.2); }

/* Loading / Success states */
.brief-loading, .brief-success {
  text-align: center;
  padding: 40px 20px;
}
.brief-loading p, .brief-success h3 { color: var(--cream); font-family: var(--font-display); font-size: 20px; margin-bottom: 8px; }
.loading-hint { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* Auth pages */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 24px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 8px;
}
.auth-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-form .btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}
.auth-switch-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.auth-switch-link:hover { text-decoration: underline; }
.form-hint-inline {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 12px;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.brief-error-msg {
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-top: 16px;
}

/* Content Section */
.content-section { margin-bottom: 40px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--cream);
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Content Card */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: border-color 0.15s;
}
.content-card:hover { border-color: rgba(246,240,232,0.15); }
.content-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.content-type-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 4px;
}
.status-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 4px;
}
.status--approved { background: rgba(34,197,94,0.12); color: #4ade80; }
.status--rejected { background: rgba(239,68,68,0.12); color: #fca5a5; }
.status--pending  { background: rgba(138,155,176,0.12); color: var(--text-secondary); }

.content-subject {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 10px;
  line-height: 1.3;
}
.content-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  margin-bottom: 16px;
}
.content-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn-approve, .btn-reject {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-approve { background: rgba(34,197,94,0.15); color: #4ade80; }
.btn-approve:hover:not(:disabled) { opacity: 0.8; }
.btn-reject  { background: rgba(239,68,68,0.12); color: #f87171; }
.btn-reject:hover:not(:disabled)  { opacity: 0.8; }
.btn-approved, .btn-approve:disabled, .btn-reject:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}