/* ───────────────────────────────────────────────────────────
   Rootcomputer Staff Portal styles
   Extends css/style.css — reuses --bg, --text-*, --hairline tokens.
   ─────────────────────────────────────────────────────────── */

.container.narrow { max-width: 520px; }

/* Allow text selection inside the portal (site disables it globally) */
.portal-form, .portal-form * , .article-body, .dash-list { user-select: text; }

/* ===== Nav logout button (matches .sub-nav-link) ===== */
.nav-logout { display: inline; margin: 0; }
.nav-logout-btn {
  background: none; border: none; cursor: pointer;
  font: inherit; padding: 0; color: inherit;
}

/* ===== Flash messages ===== */
.flash-wrap { margin-top: 1.5rem; }
.flash {
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  margin: 1rem 0;
  border: 1px solid var(--hairline);
}
.flash-success { background: rgba(80,200,140,0.10); border-color: rgba(120,230,170,0.30); color: rgba(190,245,215,0.95); }
.flash-error   { background: rgba(230,90,90,0.10);  border-color: rgba(255,130,130,0.30); color: rgba(255,200,200,0.95); }
.flash-info    { background: rgba(255,255,255,0.04); }

/* ===== Forms ===== */
.portal-form { max-width: 720px; display: grid; gap: 1.25rem; margin-top: 2rem; }
.portal-form.compact { max-width: 320px; margin-top: 1.25rem; }
.field { display: grid; gap: 0.5rem; }
.field-label {
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.field-label .hint, .hint {
  text-transform: none; letter-spacing: 0; font-size: 0.72rem;
  color: rgba(255,255,255,0.35); margin-left: 0.35rem;
}
.field-group-title {
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); margin-top: 0.5rem;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="url"], textarea, select {
  width: 100%;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.04);
}
textarea { resize: vertical; line-height: 1.55; }
textarea.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}
input[type="file"] { padding: 0.55rem; font-size: 0.85rem; color: var(--text-muted); }
select { appearance: none; cursor: pointer; }

.links-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
@media (max-width: 640px) { .links-grid { grid-template-columns: 1fr; } }

.form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; }

/* ===== Buttons ===== */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.02em;
  padding: 0.62rem 1.15rem; border-radius: 999px; cursor: pointer;
  text-decoration: none; transition: all 0.2s ease; border: 1px solid;
}
.btn-primary {
  background: rgba(255,255,255,0.92); color: #050505; border-color: transparent;
}
.btn-primary:hover { background: #fff; }
.btn-secondary {
  background: transparent; color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.18);
}
.btn-secondary:hover { color: #fff; border-color: rgba(255,255,255,0.4); }

/* ===== Avatars ===== */
.staff-avatar, .profile-avatar { overflow: hidden; }
.staff-avatar {
  width: 64px; height: 64px; border-radius: 14px;
  border: 1px solid var(--hairline); margin-bottom: 0.25rem;
  display: grid; place-items: center; background: rgba(255,255,255,0.03);
}
.staff-avatar img, .profile-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.staff-avatar-fallback {
  font-size: 1.1rem; font-weight: 500; color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}
.staff-avatar-fallback.large { font-size: 2.2rem; }
.profile-avatar {
  width: 120px; height: 120px; border-radius: 18px;
  border: 1px solid var(--hairline); flex-shrink: 0;
  display: grid; place-items: center; background: rgba(255,255,255,0.03);
}

.staff-card { align-items: flex-start; }

/* ===== Public profile head ===== */
.profile-head { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 260px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.profile-link {
  font-size: 0.78rem; padding: 0.42rem 0.85rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.85);
  transition: all 0.2s ease;
}
.profile-link:hover { color: #fff; border-color: rgba(255,255,255,0.4); }

/* ===== Tags ===== */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tag-pill {
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--hairline); color: rgba(255,255,255,0.6);
}

.card-byline {
  font-size: 0.72rem; color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em; margin-top: 0.25rem;
}

/* ===== Dashboard ===== */
.dash-grid { display: grid; grid-template-columns: 320px 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 820px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-avatar-col { display: grid; gap: 1rem; justify-items: start; }
.dash-profile-form { margin-top: 0; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-head h2 { margin-bottom: 0; }

.dash-list { margin-top: 1.5rem; }
.dash-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--hairline);
}
.dash-row-main { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.dash-row-title { font-weight: 500; }
.dash-row-actions { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.dash-row-actions form { display: inline; margin: 0; }
.row-link {
  background: none; border: none; cursor: pointer; font: inherit; padding: 0;
  font-size: 0.82rem; color: rgba(255,255,255,0.7); transition: color 0.2s ease;
}
.row-link:hover { color: #fff; }
.row-link.danger { color: rgba(255,140,140,0.8); }
.row-link.danger:hover { color: rgb(255,170,170); }

.status-badge {
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.22rem 0.5rem; border-radius: 999px; border: 1px solid var(--hairline);
}
.status-published { color: rgba(180,235,255,0.95); border-color: rgba(120,210,255,0.35); background: rgba(80,180,220,0.10); }
.status-draft { color: rgba(255,255,255,0.5); }

/* ===== Article / project body (rendered markdown) ===== */
.article-body { max-width: 760px; }
.article-body p { color: var(--text-primary); margin: 1rem 0; }
.article-body h2, .article-body h3, .article-body h4 { margin: 2rem 0 0.75rem; }
.article-body ul, .article-body ol { margin: 1rem 0; padding-left: 1.25rem; }
.article-body li { padding: 0.25rem 0; border: none; }
.article-body a { color: rgba(255,255,255,0.85); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: #fff; }
.article-body img { width: 100%; max-width: 650px; border-radius: 12px; margin: 1.5rem 0; }
.article-body pre {
  background: rgba(0,0,0,0.45); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 1rem 1.1rem; overflow: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.85rem;
}
.article-body code {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.85em;
  background: rgba(255,255,255,0.06); padding: 0.1rem 0.35rem; border-radius: 6px;
}
.article-body pre code { background: none; padding: 0; }
.article-body blockquote {
  margin: 1.25rem 0; padding: 0.5rem 1rem; border-left: 2px solid rgba(255,255,255,0.2);
  color: var(--text-muted);
}
