.swp-portal {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #111827;
}

body.swp-portal-page .widget-area,
body.swp-portal-page #secondary,
body.swp-portal-page #sidebar,
body.swp-portal-page .sidebar,
body.swp-portal-page aside.widget-area,
body.swp-portal-page .et_pb_widget_area,
body.swp-portal-page .et_pb_widget,
body.swp-portal-page #main-header,
body.swp-portal-page #main-footer,
body.swp-portal-page .entry-title,
body.swp-portal-page .post-meta,
body.swp-portal-page .comments-area,
body.swp-portal-page #comment-wrap {
  display: none !important;
}

body.swp-portal-page .content-area,
body.swp-portal-page #primary,
body.swp-portal-page #left-area,
body.swp-portal-page .site-main,
body.swp-portal-page .entry-content {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
}

body.swp-portal-page #page-container {
  padding-top: 0 !important;
}

body.swp-portal-page #main-content .container::before {
  display: none !important;
}

body.swp-portal-page .site-content .wrap,
body.swp-portal-page .wrap,
body.swp-portal-page #main-content .container {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
}

body.swp-portal-page #main-content,
body.swp-portal-page article,
body.swp-portal-page .entry-content {
  margin: 0 !important;
  padding: 0 !important;
  background: #f8fafc;
}

.swp-portal * {
  box-sizing: border-box;
}

.swp-dashboard {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 760px;
  border: 1px solid #d9e1ea;
  background: #f8fafc;
}

.swp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem 0.75rem;
  color: #f8fafc;
  background: linear-gradient(180deg, #07111d 0%, #0f2638 100%);
}

.swp-brand {
  padding: 0.75rem 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.swp-brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: 0;
}

.swp-brand span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.swp-nav {
  display: grid;
  gap: 0.35rem;
}

.swp-nav a {
  display: block;
  padding: 0.8rem 0.95rem;
  border-radius: 8px;
  color: #e5edf7;
  text-decoration: none;
}

.swp-nav a:hover,
.swp-nav a.is-active {
  color: #fff;
  background: #1f5fa8;
}

.swp-sidebar-user {
  margin-top: auto;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.swp-sidebar-user strong,
.swp-sidebar-user span {
  display: block;
}

.swp-sidebar-user span {
  margin-top: 0.15rem;
  color: #bfd0e3;
  font-size: 0.85rem;
}

.swp-main {
  min-width: 0;
  padding: 1.25rem 1.5rem 1.75rem;
}

.swp-topbar {
  margin-bottom: 1rem;
}

.swp-back,
.swp-link {
  color: #075ec7;
  font-weight: 600;
  text-decoration: none;
}

.swp-back:hover,
.swp-link:hover {
  text-decoration: underline;
}

.swp-hero {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.swp-book-cover {
  display: grid;
  place-items: center;
  width: 86px;
  min-width: 86px;
  aspect-ratio: 0.72;
  border-radius: 4px;
  border: 1px solid #b9c6d4;
  color: #0f172a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 42%),
    linear-gradient(145deg, #a7d8f0 0%, #e8f5ff 42%, #75a96b 43%, #e4d1a3 100%);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14);
  font-weight: 800;
  font-size: 1.35rem;
}

.swp-book-cover-lg {
  width: 154px;
  min-width: 154px;
  font-size: 2rem;
}

.swp-hero h2,
.swp-page-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 2.35rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.swp-hero p {
  margin: 0.45rem 0 0;
  color: #1f2937;
  font-size: 1.05rem;
}

.swp-snapshot {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr 1.2fr;
  gap: 0;
  margin-top: 1.4rem;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.swp-snapshot div {
  min-width: 0;
  padding: 1rem 1.1rem;
  border-right: 1px solid #e5ebf1;
}

.swp-snapshot div:last-child {
  border-right: 0;
}

.swp-snapshot span,
.swp-row small,
.swp-key-card small,
.swp-metric small,
.swp-timeline em {
  display: block;
  color: #526173;
  font-size: 0.8rem;
}

.swp-snapshot span {
  margin-bottom: 0.35rem;
  font-weight: 700;
  text-transform: uppercase;
}

.swp-snapshot strong {
  display: block;
  color: #111827;
  font-size: 1rem;
}

.swp-snapshot small {
  display: block;
  margin-top: 0.25rem;
  color: #526173;
}

.swp-metric-grid,
.swp-book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.swp-metric {
  display: flex;
  gap: 1rem;
  align-items: center;
  min-height: 118px;
  padding: 1rem 1.15rem;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.swp-metric-icon {
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #e8f1ff;
}

.swp-tone-green .swp-metric-icon {
  background: #daf3df;
}

.swp-tone-purple .swp-metric-icon {
  background: #eee1ff;
}

.swp-tone-gold .swp-metric-icon {
  background: #fff1c9;
}

.swp-metric p,
.swp-metric strong {
  margin: 0;
}

.swp-metric strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.75rem;
  line-height: 1;
}

.swp-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 0.88fr 1.12fr;
  gap: 1rem;
  margin-top: 1rem;
}

.swp-panel,
.swp-book-card,
.swp-empty {
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.swp-panel {
  padding: 1.1rem;
}

.swp-panel h3 {
  margin: 0 0 1rem;
  color: #111827;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.swp-panel-wide {
  min-width: 0;
}

.swp-row-list {
  display: grid;
}

.swp-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  min-height: 58px;
  padding: 0.7rem 0;
  border-bottom: 1px solid #edf1f5;
}

.swp-row:last-child {
  border-bottom: 0;
}

.swp-row strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 0.95rem;
}

.swp-row a {
  color: #111827;
  text-decoration: none;
}

.swp-row a:hover {
  color: #075ec7;
}

.swp-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid #94a3b8;
  border-radius: 999px;
}

.swp-check.is-done {
  border-color: #1f9d4c;
  background: #1f9d4c;
}

.swp-file-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 38px;
  border: 1px solid #ef4444;
  border-radius: 4px;
  color: #dc2626;
  font-size: 0.62rem;
  font-weight: 800;
  background: #fff7f7;
}

.swp-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: #5f4200;
  background: #fff2ca;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.swp-status-active,
.swp-status-approved,
.swp-status-final,
.swp-priority-low {
  color: #116329;
  background: #dff7e5;
}

.swp-status-waiting-on-author,
.swp-status-waiting-on-swp,
.swp-status-in-review,
.swp-priority-high {
  color: #8a4b00;
  background: #fff0c2;
}

.swp-status-at-risk,
.swp-status-blocked,
.swp-status-changes-requested,
.swp-priority-urgent {
  color: #991b1b;
  background: #fee2e2;
}

.swp-status-paused,
.swp-status-draft,
.swp-priority-normal,
.swp-priority-medium {
  color: #334155;
  background: #e9eef5;
}

.swp-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.swp-timeline li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 40px;
  position: relative;
}

.swp-timeline li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 26px;
  bottom: -14px;
  width: 2px;
  background: #d4dce6;
}

.swp-timeline li:last-child::before {
  display: none;
}

.swp-timeline span {
  width: 20px;
  height: 20px;
  border: 2px solid #c6d0dc;
  border-radius: 999px;
  background: #fff;
}

.swp-timeline li.is-done span {
  border-color: #21964b;
  background: #21964b;
}

.swp-timeline li.is-current span {
  border-color: #076ce0;
  box-shadow: inset 0 0 0 4px #fff;
  background: #076ce0;
}

.swp-timeline strong {
  font-size: 0.95rem;
}

.swp-key-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.swp-key-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.7rem;
  align-items: center;
  min-height: 72px;
  padding: 0.75rem;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  color: #111827;
  text-decoration: none;
}

.swp-key-card strong,
.swp-key-card small {
  grid-column: 2;
}

.swp-key-card:hover {
  border-color: #8eb9ef;
  background: #f8fbff;
}

.swp-key-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: #fff;
  background: #1f6feb;
  font-size: 0.62rem;
  font-weight: 800;
}

.swp-key-pdf {
  background: #ef4444;
}

.swp-key-drive {
  background: #1f9d4c;
}

.swp-key-link {
  background: #475569;
}

.swp-page-head {
  margin-bottom: 1rem;
}

.swp-eyebrow {
  margin: 0 0 0.2rem;
  color: #526173;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.swp-book-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.swp-book-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
}

.swp-book-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
}

.swp-book-card-body {
  min-width: 0;
  flex: 1;
}

.swp-book-meta,
.swp-book-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.swp-book-meta {
  margin: 0.55rem 0;
}

.swp-book-meta > span,
.swp-book-stats span {
  color: #526173;
  font-size: 0.82rem;
}

.swp-progress {
  height: 8px;
  width: 100%;
  margin: 0.75rem 0;
  border-radius: 999px;
  background: #e5eaf0;
  overflow: hidden;
}

.swp-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0b67d1, #27a45b);
}

.swp-empty {
  padding: 1.5rem;
}

.swp-muted {
  color: #526173;
}

.swp-message-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 460px;
  margin-bottom: 1rem;
  padding: 0.35rem 0.25rem 0.65rem;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.swp-message-bubble {
  width: min(78%, 620px);
  padding: 0.8rem 0.95rem;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #f8fafc;
}

.swp-message-staff {
  align-self: flex-start;
  border-color: #d3e2f6;
  background: #f3f8ff;
}

.swp-message-author {
  align-self: flex-end;
  border-color: #b9d8ff;
  color: #fff;
  background: #155fc7;
}

.swp-message-meta {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.swp-message-meta strong {
  font-size: 0.88rem;
}

.swp-message-meta span,
.swp-message-status {
  color: #526173;
  font-size: 0.78rem;
}

.swp-message-author .swp-message-meta span,
.swp-message-author .swp-message-status {
  color: rgba(255, 255, 255, 0.78);
}

.swp-message-copy {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.swp-message-status {
  display: block;
  margin-top: 0.4rem;
  font-weight: 700;
}

.swp-message-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding-top: 0.85rem;
  border-top: 1px solid #edf1f5;
}

.swp-message-compose label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  color: #334155;
  font-weight: 700;
}

.swp-message-compose textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
}

.swp-access-request {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem;
  background:
    linear-gradient(135deg, rgba(31, 95, 168, 0.08), rgba(22, 101, 52, 0.06)),
    #f8fafc;
}

.swp-access-card {
  width: min(100%, 540px);
}

.swp-access-brand {
  margin-bottom: 1.25rem;
  color: #0f172a;
  text-align: center;
}

.swp-access-brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.4rem;
  line-height: 1;
}

.swp-access-brand span {
  display: block;
  margin-top: 0.35rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.swp-access-request .swp-panel {
  padding: 1.6rem;
}

.swp-access-request h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.85rem;
  letter-spacing: 0;
}

.swp-access-request .swp-muted {
  margin: 0.7rem 0 0;
}

.swp-access-request .swp-message-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.swp-access-request .swp-message-form label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  color: #334155;
  font-weight: 700;
}

.swp-access-request input[type="email"] {
  width: 100%;
  min-height: 46px;
}

.swp-quiet-panel {
  margin-top: 1rem;
}

.swp-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.swp-detail-list .swp-task {
  margin: 0;
  min-width: 0;
}

.swp-notice {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-weight: 700;
}

.swp-notice-success {
  border: 1px solid #a7e0ba;
  color: #14532d;
  background: #ecfdf3;
}

.swp-notice-error {
  border: 1px solid #fecaca;
  color: #7f1d1d;
  background: #fef2f2;
}

.swp-upload-panel {
  margin-top: 1rem;
}

.swp-upload-form {
  display: grid;
  gap: 0.75rem;
}

.swp-upload-form input[type="file"] {
  width: 100%;
  max-width: 560px;
  padding: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.swp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 0.65rem 0.95rem;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #075ec7;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.swp-btn:hover {
  background: #064b9f;
}

.swp-task,
.swp-task-update,
.swp-stepper,
.swp-key-links,
.swp-notes {
  display: none;
}

@media (max-width: 1100px) {
  .swp-dashboard {
    grid-template-columns: 1fr;
  }

  .swp-sidebar {
    display: none;
  }

  .swp-snapshot,
  .swp-metric-grid,
  .swp-dashboard-grid,
  .swp-key-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swp-panel-wide {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .swp-main {
    padding: 1rem;
  }

  .swp-hero {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .swp-book-cover-lg {
    width: 118px;
    min-width: 118px;
  }

  .swp-hero h2,
  .swp-page-head h2 {
    font-size: 1.8rem;
  }

  .swp-snapshot,
  .swp-metric-grid,
  .swp-dashboard-grid,
  .swp-key-card-grid {
    grid-template-columns: 1fr;
  }

  .swp-message-thread {
    max-height: 520px;
  }

  .swp-message-bubble {
    width: 92%;
  }

  .swp-message-compose {
    grid-template-columns: 1fr;
  }

  .swp-message-compose .swp-btn {
    width: 100%;
  }

  .swp-snapshot div {
    border-right: 0;
    border-bottom: 1px solid #e5ebf1;
  }

  .swp-snapshot div:last-child {
    border-bottom: 0;
  }
}

.swp-admin-timeline {
  margin: 0;
}

.swp-admin-timeline li {
  border-left: 3px solid #d8e2ed;
  margin: 0 0 0.85rem;
  padding: 0 0 0.85rem 0.75rem;
}

.swp-admin-timeline p {
  margin: 0.35rem 0 0;
}

.swp-action-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 16px;
}

.swp-action-card {
  background: #fff;
  border: 1px solid #d8e2ed;
  border-radius: 8px;
  padding: 16px;
}

.swp-action-card h2 {
  align-items: center;
  display: flex;
  font-size: 1.05rem;
  justify-content: space-between;
  margin: 0 0 8px;
}

.swp-action-card h2 span {
  background: #eef4fb;
  border-radius: 999px;
  color: #1d4f82;
  display: inline-block;
  font-size: 0.8rem;
  min-width: 1.8rem;
  padding: 0.15rem 0.45rem;
  text-align: center;
}

.swp-action-card ul {
  margin: 12px 0 0;
}

.swp-action-card li {
  border-top: 1px solid #edf1f6;
  margin: 0;
  padding: 10px 0;
}

.swp-summary-form {
  margin: 12px 0 18px;
}

.swp-action-filter-form {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.swp-approval-form {
  border-top: 1px solid #e5ebf1;
  grid-column: 1 / -1;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.swp-legal-copy {
  color: #42526a;
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 0.65rem;
}

.swp-check-label,
.swp-revision-label {
  display: block;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.swp-revision-label textarea {
  box-sizing: border-box;
  display: block;
  margin-top: 0.35rem;
  width: 100%;
}

.swp-approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.swp-btn-secondary {
  background: #506176;
}

.swp-btn-secondary:hover {
  background: #3e4c5f;
}

.swp-approval-note {
  color: #42526a;
}

.swp-admin-health {
  margin: 8px 0 0;
}

.swp-admin-health li {
  border-left: 3px solid #b32d2e;
  margin: 0 0 8px;
  padding: 2px 0 2px 8px;
}
