/* nysiaa-OS portal pages — accounts, forum, support desk.
   Layered on site.css: inherits the palette, the RTL default and the [lang-ar]/[lang-en]
   switching, and adds only what the marketing page has no equivalent of. */

.portal-body { padding-top: 0; }

.p-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 11, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.p-top-in { display: flex; align-items: center; gap: 18px; padding: 12px 22px; flex-wrap: wrap; }
.p-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.p-brand:hover { text-decoration: none; }
.p-brand b { display: block; font-size: 15px; letter-spacing: 0.2px; }
.p-brand em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }

.p-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.p-nav a {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--muted);
  border: 1px solid transparent;
}
.p-nav a:hover { color: var(--text); text-decoration: none; background: rgba(255, 255, 255, 0.04); }
.p-nav a.active { color: var(--text); border-color: var(--blue); background: rgba(0, 174, 239, 0.12); }

.p-top-actions { display: flex; align-items: center; gap: 8px; }
.p-who { font-size: 12.5px; color: var(--muted); }
.p-who b { color: var(--text); }

.p-main { padding: 26px 22px 60px; min-height: 62vh; }

.p-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.p-card > h2 { margin: 0 0 6px; font-size: 19px; }
.p-card > h3 { margin: 0 0 10px; font-size: 16px; }
.p-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.p-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }

.p-field { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.p-field > span { display: block; margin-bottom: 5px; }
.p-field input,
.p-field select,
.p-field textarea {
  width: 100%;
  padding: 10px 12px;
  background: #0a1218;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}
.p-field textarea { resize: vertical; line-height: 1.7; }
.p-field input:focus,
.p-field select:focus,
.p-field textarea:focus { outline: none; border-color: var(--blue); }
.p-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.p-check input { margin-top: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid var(--blue);
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  color: #04131b;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); font-weight: 600; }
.btn.ghost:hover { border-color: var(--blue); }
.btn.sm { padding: 7px 12px; font-size: 12.5px; }

.muted { color: var(--muted); font-size: 13px; }
.p-err { color: #ff6b6b; font-size: 13px; margin: 8px 0 0; }
.p-ok { color: var(--green); font-size: 13px; margin: 8px 0 0; }
.p-note {
  border: 1px solid rgba(246, 184, 60, 0.4);
  background: rgba(246, 184, 60, 0.08);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.p-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
}
.p-tag.warn { border-color: rgba(246, 184, 60, 0.5); color: var(--gold); }
.p-tag.ok { border-color: rgba(46, 204, 113, 0.45); color: var(--green); }

.p-list { display: flex; flex-direction: column; gap: 10px; }
.p-item {
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 13px 15px;
  background: #0a1218;
}
.p-item a { font-size: 14.5px; font-weight: 700; }
.p-item-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 5px; }

/* Post and message bodies are author-supplied. They are inserted as text nodes, never as HTML;
   these rules stop a single long unbroken string from widening the page and preserve the line
   breaks the author actually typed. */
.p-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.8; }

.p-post { border: 1px solid var(--border); border-radius: 13px; padding: 14px 16px; margin-bottom: 11px; background: #0a1218; }
.p-post.mine { border-color: rgba(0, 174, 239, 0.35); }
.p-post-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.p-post-head b { color: var(--text); }

.p-cats { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.p-cats button {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.p-cats button.active { border-color: var(--blue); color: var(--text); background: rgba(0, 174, 239, 0.12); }

.p-files { font-size: 12.5px; color: var(--muted); }
.p-files li { margin: 2px 0; }

.p-toasts { position: fixed; inset-block-end: 18px; inset-inline-end: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.p-toast {
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 18, 25, 0.96);
  font-size: 13px;
  max-width: 380px;
  box-shadow: var(--shadow);
}
.p-toast.ok { border-color: rgba(46, 204, 113, 0.5); }
.p-toast.bad { border-color: rgba(255, 107, 107, 0.5); }

.p-foot { border-top: 1px solid var(--border); padding: 18px 0; font-size: 12.5px; color: var(--muted); }

.hidden { display: none !important; }

@media (max-width: 720px) {
  .p-nav { margin-inline-start: 0; order: 3; width: 100%; }
  .p-top-actions { margin-inline-start: auto; }
}
