:root {
  --portal-bg: #07111f;
  --portal-panel: #0d1c2e;
  --portal-line: rgba(255, 255, 255, 0.1);
}

.portal-body {
  min-height: 100vh;
  color: #cbd6e1;
  background:
    radial-gradient(circle at 80% 0%, rgba(52, 190, 169, 0.13), transparent 30%),
    var(--portal-bg);
}

.portal-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--portal-line);
  background: rgba(7, 17, 31, 0.94);
  backdrop-filter: blur(18px);
}

.portal-header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.portal-header-actions,
.portal-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.portal-header-actions span {
  color: #91a1b1;
  font-size: 0.85rem;
}

.portal-nav a {
  color: #c8d3de;
  font-weight: 750;
}

.portal-nav a:hover {
  color: var(--mint);
}

.portal-signout {
  padding: 9px 16px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.portal-main {
  padding: 80px 0 120px;
}

.portal-welcome {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 60px;
  margin-bottom: 60px;
}

.portal-welcome h1,
.portal-page-heading h1 {
  max-width: 900px;
  color: #fff;
  font-size: clamp(3rem, 6vw, 5.5rem);
}

.portal-welcome h1 span {
  color: var(--mint);
}

.portal-welcome p,
.portal-page-heading p {
  max-width: 730px;
  color: #9cadbd;
  font-size: 1.08rem;
}

.portal-eyebrow {
  display: block;
  margin-bottom: 20px;
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.portal-role-card {
  min-width: 230px;
  padding: 22px;
  display: grid;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.portal-role-card span,
.portal-role-card small {
  color: #8191a1;
}

.portal-role-card strong {
  margin: 5px 0;
  color: #fff;
  font-size: 1.3rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.portal-action-card {
  min-height: 290px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--portal-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.portal-action-card:hover {
  transform: translateY(-5px);
  border-color: rgba(116, 239, 211, 0.45);
  background: rgba(116, 239, 211, 0.055);
}

.portal-action-card > span {
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 900;
}

.portal-action-card h2 {
  margin-top: 50px;
  color: #fff;
  font-size: 2rem;
}

.portal-action-card p {
  color: #9cadbd;
}

.portal-action-card strong {
  margin-top: auto;
  color: var(--mint);
}

.portal-access-message,
.portal-empty {
  padding: 45px;
  border: 1px solid var(--portal-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
}

.portal-access-message h2,
.portal-empty h2 {
  color: #fff;
}

.portal-admin-banner {
  margin-top: 25px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 1px solid rgba(116, 239, 211, 0.4);
  border-radius: 22px;
  background: rgba(116, 239, 211, 0.07);
}

.portal-admin-banner span {
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 900;
}

.portal-admin-banner h2 {
  margin: 5px 0 0;
  color: #fff;
}

.portal-admin-banner a {
  color: var(--mint);
  font-weight: 900;
}

.portal-page-heading {
  margin-bottom: 55px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 45px;
}

.article-editor-form {
  padding: 35px;
  color: var(--ink);
  border-radius: 24px;
  background: #fff;
}

.article-editor-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 0.82rem;
  font-weight: 850;
}

.article-editor-form input,
.article-editor-form textarea,
.article-editor-form select,
.editorial-note-field textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--ink);
  border: 1px solid #cfd8df;
  border-radius: 11px;
  background: #fff;
  outline: none;
}

.article-editor-form input:focus,
.article-editor-form textarea:focus,
.article-editor-form select:focus {
  border-color: var(--mint-dark);
  box-shadow: 0 0 0 4px rgba(36, 185, 154, 0.11);
}

.article-editor-form small {
  color: #788895;
  text-align: right;
}

.editor-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.seo-panel {
  position: sticky;
  top: 110px;
}

.seo-preview-card,
.seo-metrics,
.seo-guidance {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--portal-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.seo-preview-card span {
  color: #71bda9;
  font-size: 0.78rem;
}

.seo-preview-card strong {
  margin: 10px 0;
  display: block;
  color: #b6d2ff;
  font-size: 1.15rem;
}

.seo-preview-card p,
.seo-guidance li {
  color: #9cadbd;
  font-size: 0.88rem;
}

.seo-metrics {
  display: grid;
  gap: 14px;
}

.seo-metrics div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.seo-metrics span {
  color: #8292a2;
}

.seo-metrics strong {
  max-width: 210px;
  overflow: hidden;
  color: #fff;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-guidance strong {
  color: #fff;
}

.portal-list {
  display: grid;
  gap: 16px;
}

.portal-list-item {
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  border: 1px solid var(--portal-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.portal-list-item h2 {
  color: #fff;
}

.portal-list-item p {
  color: #9cadbd;
}

.portal-list-meta {
  margin-bottom: 12px;
  display: flex;
  gap: 15px;
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.article-list-status {
  min-width: 120px;
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 8px;
}

.article-list-status small {
  color: #8292a2;
}

.status-pill {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-draft {
  color: #bed1df;
  background: #263a4d;
}

.status-submitted {
  color: #07111f;
  background: #ffc96f;
}

.status-published {
  color: #07111f;
  background: var(--mint);
}

.status-rejected {
  color: #fff;
  background: #bb5363;
}

.article-status-filters {
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.article-status-filters button {
  padding: 9px 15px;
  color: #b9c5d0;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.article-status-filters button.active {
  color: var(--navy);
  border-color: var(--mint);
  background: var(--mint);
}

.editorial-note {
  margin-top: 18px;
  padding: 15px;
  color: #ffe4a7;
  border-left: 3px solid #ffc96f;
  background: rgba(255, 201, 111, 0.07);
}

.admin-stats {
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.admin-stats article {
  padding: 25px;
  display: grid;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-stats span {
  color: #8394a4;
}

.admin-stats strong {
  color: #fff;
  font-size: 2.5rem;
}

.admin-review-item {
  grid-template-columns: 1fr 180px;
}

.admin-review-actions {
  display: grid;
  align-content: start;
  gap: 10px;
}

.admin-review-actions button {
  min-height: 45px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  font-weight: 850;
  cursor: pointer;
}

.admin-review-actions button:first-child {
  color: var(--navy);
  background: var(--mint);
}

.admin-review-actions button:last-child {
  color: #fff;
  background: #a14d5a;
}

.admin-review-item details {
  margin: 20px 0;
}

.admin-review-item summary {
  color: var(--mint);
  font-weight: 800;
  cursor: pointer;
}

.submitted-content {
  margin-top: 15px;
  padding: 20px;
  color: #b9c6d2;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.editorial-note-field {
  display: grid;
  gap: 8px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .portal-welcome,
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .seo-panel {
    position: static;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-role-card {
    min-width: 0;
  }
}

@media (max-width: 650px) {
  .portal-main {
    padding-top: 50px;
  }

  .portal-header-actions span,
  .portal-nav {
    display: none;
  }

  .portal-welcome h1,
  .portal-page-heading h1 {
    font-size: 3rem;
  }

  .editor-two-columns,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .article-editor-form {
    padding: 22px;
  }

  .portal-list-item,
  .admin-review-item {
    grid-template-columns: 1fr;
  }

  .article-list-status {
    justify-items: start;
  }

  .editor-actions,
  .portal-admin-banner {
    align-items: stretch;
    flex-direction: column;
  }
}
