:root {
  --bs-success: #1B4D2E;
  --bs-success-rgb: 27, 77, 46;
  --surface: #ffffff;
  --surface-soft: #f7faf7;
  --ink: #15251b;
  --muted: #617166;
  --line: #dbe8df;
  --accent: #b48b2d;
}

/* ============================================================
   Global scrollbar stabilization.
   Bootstrap hides the page scrollbar when a modal opens. Without
   this rule, the whole page widens by ~15px and every full-width
   element reflows. Forcing the scrollbar to always be present
   (even when not needed) prevents the reflow.
   ============================================================ */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  background:
    linear-gradient(135deg, rgba(13, 53, 32, 0.98) 0%, rgba(27, 77, 46, 0.96) 52%, rgba(10, 38, 25, 0.98) 100%);
  min-height: 100vh;
  position: relative;
  color: var(--ink);
}

/* Decorative elements */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.app-shell {
  min-height: 100vh;
}

.login-card,
.card {
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 35px rgba(16, 34, 24, 0.08);
  border: 1px solid rgba(219, 232, 223, 0.9) !important;
}

.public-hero {
  background:
    linear-gradient(120deg, rgba(27, 77, 46, 0.12), rgba(180, 139, 45, 0.14)),
    #ffffff;
  border-bottom: 1px solid var(--line);
  border-radius: 0.75rem 0.75rem 0 0;
}

.journal-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.journal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(16, 34, 24, 0.12);
  border-color: rgba(27, 77, 46, 0.22) !important;
}

/* Hero is now the search field's home: text on the left, search on the right. */
.public-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.public-hero-text {
  flex: 1 1 320px;
  min-width: 0;
}

.public-search {
  flex: 0 1 380px;
  min-width: 0;
  align-self: flex-end;
}

/* Icon and input form one field; the icon sits over the input's left padding. */
.public-search-input {
  position: relative;
  width: 100%;
}

.public-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #94a3b8;
  pointer-events: none;
}

.public-search .form-control {
  border-color: var(--line);
  border-radius: 0.75rem;
  box-shadow: 0 4px 14px rgba(16, 34, 24, 0.06);
  font-size: 0.9rem;
  padding: 7px 14px 7px 38px;
  background: #ffffff;
}

.public-search .form-control:focus {
  border-color: rgba(27, 77, 46, 0.5);
  box-shadow: 0 0 0 0.2rem rgba(27, 77, 46, 0.12);
  background: #ffffff;
}

@media (max-width: 767.98px) {
  .public-hero-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .public-search {
    flex: 1 1 auto;
  }
}

.public-journal-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-card {
  background: linear-gradient(180deg, #ffffff 0%, #f3faf4 100%);
  border: none;
  position: sticky;
  top: 1rem;
}

.sidebar-card .nav-link {
  background: #ffffff;
  color: #1B4D2E;
  border: 1px solid #dcfce7;
  border-radius: 0.65rem;
  font-weight: 600;
  text-align: left;
  width: 100%;
}

.sidebar-card .nav-link.active {
  background: #1B4D2E;
  color: #fff;
  border-color: #1B4D2E;
}

.sidebar-tools {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 1rem;
  padding: 1rem 0;
  text-align: left;
}

.dashboard-section {
  scroll-margin-top: 1.25rem;
}

.admin-panel-section.d-none,
.student-panel-section.d-none,
.review-panel-section.d-none {
  display: none !important;
}

.table > :not(caption) > * > * {
  vertical-align: middle;
  border-bottom-color: var(--line);
}

.form-control,
.form-select {
  border-color: var(--line);
  border-radius: 0.6rem;
}

.ts-wrapper { width: 100%; }
.ts-control { border-color: var(--line); border-radius: 0.6rem; min-height: 38px; }

.ts-dropdown {
  z-index: 1060;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.ts-dropdown::-webkit-scrollbar {
  width: 6px;
}

.ts-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.ts-dropdown::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.ts-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.ts-wrapper.single .ts-control:after { border-color: #495057 transparent transparent; }
.ts-wrapper.focus .ts-control { border-color: #86b7fe; box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15); }
.ts-dropdown .active { background-color: #e9f5ec; color: #173f2c; }

.btn {
  border-radius: 0.6rem;
  font-weight: 600;
}

.badge {
  border-radius: 999px;
}

.status-pill {
  color: #fff;
  font-weight: 500;
  text-transform: capitalize;
}

.status-pending { background: #f59e0b; }
.status-under-review { background: #0ea5e9; }
.status-revision-required { background: #f97316; }
.status-accepted { background: #1B4D2E; }
.status-rejected { background: #dc2626; }

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.review-document {
  background: #ffffff;
  min-height: 220px;
  line-height: 1.65;
}

.doc-highlight {
  background: #fff2a8;
  border-radius: 0.2rem;
  cursor: pointer;
  padding: 0 0.1rem;
}

.review-comment-list {
  max-height: 340px;
  overflow: auto;
  border: 1px solid #dcfce7;
  border-radius: 0.75rem;
  background: #f8fff9;
  padding: 0.75rem;
}

.review-comment-box {
  border: 1px solid #c7f0d5;
  border-radius: 0.6rem;
  background: #ffffff;
  padding: 0.6rem;
  margin-bottom: 0.6rem;
}

.review-comment-box:last-child {
  margin-bottom: 0;
}

.review-comment-focus {
  box-shadow: 0 0 0 2px rgba(27, 77, 46, 0.25);
}

@media (max-width: 991.98px) {
  .review-grid {
    grid-template-columns: 1fr;
  }

  .review-comment-list {
    max-height: 260px;
  }
}

/* Gradient backgrounds for statistics cards */
.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-info {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #1B4D2E 0%, #0D3520 100%);
}

/* Card improvements */
.card-header {
  background: linear-gradient(to bottom, #ffffff, #f8f9fa);
}

/* Message list styling */
.message-list::-webkit-scrollbar {
  width: 5px;
}

.message-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

.message-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

.message-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Review document improvements */
.review-document {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  background: #fefefe;
}

body.dashboard-active {
  background: #eaf8ef;
  color: #111827;
}

body.dashboard-active::before {
  display: none;
}

body.dashboard-active .app-shell {
  max-width: none;
  padding: 0 !important;
}

.dashboard-shell {
  min-height: 100vh;
  background: #eaf8ef;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.dashboard-sidebar {
  background: #1d563b;
  color: #ffffff;
  min-height: 100vh;
  padding: 28px 14px 18px;
  display: flex;
  flex-direction: column;
}

.brand-block {
  text-align: center;
  padding-bottom: 31px;
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  margin: 0 auto 9px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #102a21;
  font-size: 18px;
}

.brand-block h1 {
  font-size: 22px;
  line-height: 1;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-block p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  line-height: 1.8;
}

.dashboard-nav {
  gap: 9px;
  margin-top: 20px;
}

.dashboard-nav .nav-link,
.sidebar-action {
  width: 100%;
  min-height: 35px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}

.dashboard-nav .nav-link i,
.sidebar-action i {
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-nav .nav-link.active {
  background: #2d784a;
  color: #ffffff;
}

.dashboard-nav .nav-link.active i {
  color: #ffffff;
}

.dashboard-nav .nav-link:hover,
.sidebar-action:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.dashboard-nav .nav-link:hover i,
.sidebar-action:hover i {
  color: #ffffff;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
}

.sidebar-tools {
  display: none !important;
}

.dashboard-main {
  min-width: 0;
  padding: 29px 42px 40px 30px;
}

.student-dashboard-shell .dashboard-main {
  padding: 28px 22px 22px 22px;
}

.student-dashboard-shell .dashboard-header {
  margin-bottom: 22px;
}

.student-dashboard-shell .dashboard-header h2 {
  font-size: 21px;
}

.student-dashboard-shell .dashboard-header p {
  font-size: 12px;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.dashboard-header h2 {
  margin: 0 0 2px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.dashboard-header p {
  margin: 0;
  color: #385266;
  font-size: 13px;
}

.admin-dashboard-panel {
  background: transparent;
}

.admin-panel-content {
  display: block;
}

/*admin dashboard statistics and recent activity cards*/
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}

.stat-card,
.recent-activity-card {
  background: #ffffff;
  border: 1px solid #e6eef0;
  border-radius: 7px;
  box-shadow: 0 2px 6px rgba(18, 35, 28, 0.11);
}

.stat-card {
  min-height: 157px;
  padding: 29px 20px 17px;
  cursor: pointer;
}

/* Active state for the student dashboard filter cards */
.stat-card.is-active {
  border-color: #1B4D2E;
  box-shadow: 0 0 0 2px rgba(27, 77, 46, 0.16), 0 2px 6px rgba(18, 35, 28, 0.12);
  background: #fbfefc;
}

.stat-card.is-active .stat-icon {
  color: #1B4D2E;
}

.stat-card.is-active .stat-link {
  color: #1B4D2E;
}

.stat-card.is-active .stat-link i {
  color: #1B4D2E;
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 11px;
}

/* Icon for admin statistics cards */
.stat-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  background: #ffff;
  color: #145640;
  font-size: 32px;
}

.stat-card strong {
  font-size: 30px;
  line-height: 1;
  color: #273141;
}

.stat-card p {
  margin: 0;
  text-align: right;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  color: #263242;
}

.stat-link {
  width: 100%;
  border: 0;
  border-top: 1px solid #d6dde2;
  margin-top: 19px;
  padding: 13px 0 4px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #526175;
  font-size: 14px;
}

.stat-link i {
  color: #426077;
  font-size: 13px;
}

.recent-activity-card {
  padding: 26px 24px 30px;
}

.recent-activity-card h3 {
  margin: 0 0 22px;
  font-size: 16px;
  font-weight: 800;
  color: #030712;
}

.activity-list {
  display: grid;
  gap: 0;
}

.activity-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 55px;
  border-bottom: 1px solid #dbe2e8;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dot-1 { background: #6f7b86; }
.dot-2 { background: #f5b400; }
.dot-3 { background: #1f8a59; }
.dot-4 { background: #dc3545; }

.activity-item p {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

.activity-item strong {
  font-weight: 800;
}

.activity-item time {
  color: #334155;
  font-size: 14px;
  white-space: nowrap;
}

/* ============================================================
   Admin dashboard — Recent Activity expanded card
   All row indicators share a single green tone.
   ============================================================ */
.activity-card-expanded {
  display: flex;
  flex-direction: column;
}

.activity-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.activity-card-header h3 {
  margin-bottom: 0;
}

.activity-card-count {
  font-size: 11px;
  font-weight: 600;
  color: #1B4D2E;
  background: #e8f4ec;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.activity-list-scroll {
  max-height: min(420px, 55vh);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.activity-list-scroll::-webkit-scrollbar {
  width: 6px;
}

.activity-list-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.activity-list-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.activity-list-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.activity-item-detailed {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  min-height: 56px;
  border-bottom: 1px solid #dbe2e8;
  box-sizing: border-box;
}

.activity-item-detailed:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.activity-item-detailed:first-child {
  padding-top: 4px;
}

.activity-item-detailed .activity-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.activity-item-detailed .activity-lead {
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.3;
  color: #111827;
  overflow-wrap: anywhere;
}

.activity-item-detailed .activity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  font-size: 11px;
  line-height: 1.2;
  color: #64748b;
}

.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
  background: #e8f4ec;
  color: #1B4D2E;
}

.activity-body {
  min-width: 0;
}

.activity-lead {
  margin: 0 0 4px;
  color: #111827;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.activity-lead strong {
  font-weight: 700;
}

.activity-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}

.activity-actor {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-actor i {
  font-size: 10px;
  opacity: 0.7;
}

.activity-sep {
  opacity: 0.5;
}

.activity-time {
  white-space: nowrap;
}

.submissions-view {
  max-width: 960px;
}

.back-dashboard-btn {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  margin-bottom: 18px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.manuscripts-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  padding: 21px 23px 18px;
}

.manuscripts-card h3 {
  margin: 0 0 18px;
  color: #111827;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
}

.manuscripts-table {
  border: 1px solid #d9dee6;
  margin-bottom: 14px;
}

.manuscripts-table th,
.manuscripts-table td {
  border-color: #d9dee6;
  padding: 14px 16px;
  color: #111827;
  font-size: 14px;
}

.manuscripts-table th {
  font-size: 12px;
  font-weight: 800;
  background: #ffffff;
}

.assign-reviewer-btn {
  border-radius: 3px;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  white-space: nowrap;
}

.submissions-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.submissions-pagination button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.submissions-pagination button.active {
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
}

.assign-reviewer-modal {
  border: 1px solid #d6d9de;
  border-radius: 4px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
}

.assign-reviewer-modal .modal-header,
.assign-reviewer-modal .modal-footer {
  border-color: #e5e7eb;
  padding: 18px 22px;
}

.assign-reviewer-modal .modal-title {
  font-size: 20px;
  font-weight: 800;
}

.assign-reviewer-modal .modal-body {
  padding: 20px 22px 22px;
}

.assign-reviewer-modal .form-label {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.assign-reviewer-modal .btn {
  min-width: 92px;
  border-radius: 4px;
}

.admin-list-modal {
  border: 1px solid #d6d9de;
  border-radius: 4px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}

.admin-list-modal .modal-header {
  border-color: #e5e7eb;
  padding: 18px 22px;
}

.admin-list-modal .modal-title {
  color: #111827;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-list-modal .modal-body {
  padding: 20px 22px 22px;
}

.modal-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.details-list {
  margin: 0;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px 16px;
}

.details-list dt {
  color: #111827;
  font-weight: 800;
}

.details-list dd {
  margin: 0;
  color: #374151;
}

.reviewer-panel-content {
  display: block;
}


.reviewer-dashboard-table {
  margin-bottom: 14px;
}

.reviewer-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.reviewer-card-heading h3 {
  margin-bottom: 0;
}

.reviewer-compact-table th,
.reviewer-compact-table td {
  padding-top: 9px;
  padding-bottom: 9px;
}

.reviewer-dashboard-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reviewer-mini-panel {
  padding: 16px 18px;
}

.reviewer-mini-panel h3 {
  margin-bottom: 10px;
}

.reviewer-dashboard-panels ul {
  margin: 0;
  padding-left: 18px;
  color: #111827;
  font-size: 14px;
}

.resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
}

.reviewer-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 220px;
  gap: 14px;
  margin: 18px 0;
}

.reviewer-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid #e5e7eb;
  margin-top: 6px;
}

.reviewer-tab {
  border: 0;
  background: transparent;
  color: #111827;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: capitalize;
}

.reviewer-tab.active {
  border-bottom: 2px solid #111827;
}

.reviewer-status {
  border-radius: 4px;
  color: #111827;
  font-weight: 700;
  padding: 7px 10px;
}

.reviewer-status-pending {
  background: #e5e7eb;
}

.reviewer-status-on-process {
  background: #dbeafe;
}

.reviewer-status-reviewed {
  background: #dcfce7;
}

.reviewer-status-legend {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-top: 18px;
  padding: 13px 16px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  color: #111827;
  font-size: 12px;
}

.reviewer-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.reviewer-dot.pending {
  background: #9ca3af;
}

.reviewer-dot.on-process {
  background: #6b7280;
}

.reviewer-dot.reviewed {
  background: #111827;
}

.reviewer-icon-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reviewer-review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.reviewer-review-header h3 {
  margin: 8px 0 4px;
  font-size: 20px;
  font-weight: 800;
}

.reviewer-review-header p,
.reviewer-review-header small {
  margin: 0;
  color: #374151;
}

.reviewer-review-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 260px;
}

.reviewer-review-tabs {
  margin-bottom: 12px;
}

.reviewer-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(460px, 0.9fr);
  gap: 14px;
}

.reviewer-viewer-card {
  min-width: 0;
}

.reviewer-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 8px;
  margin: 14px 0;
}

.docx-zoom-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.docx-zoom-toolbar [data-docx-zoom="reset"] {
  min-width: 58px;
}

.docx-modal-zoom-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 6px 0;
  background: #ffffff;
}

.reviewer-document-viewer {
  border: 1px solid #d9dee6;
  border-radius: 4px;
  background: #f8fafc;
  height: 600px;
  max-height: 80vh;
  min-height: 0;
  overflow: auto;
}

.reviewer-document-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: 0;
}

.reviewer-docx-preview {
  max-height: 100%;
  overflow: auto;
}

.docx-preview-container {
  max-height: calc(100vh - 220px);
  overflow: auto;
  background: #eef1f4;
}

.docx-toolbar-divider {
  display: inline-block;
  width: 1px;
  height: 24px;
  background: #d1d5db;
  margin: 0 4px;
  vertical-align: middle;
}

.docx-zoom-toolbar [data-docx-page="indicator"]:disabled {
  opacity: 1;
  color: #374151;
  background: #ffffff;
  cursor: default;
}

.reviewer-document-fallback {
  min-height: 600px;
  padding: 18px;
  margin: 0;
  white-space: pre-wrap;
  background: #ffffff;
}

.reviewer-recommendation-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.reviewer-recommendation-panel > .recent-activity-card {
  min-width: 0;
}

.reviewer-side-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.65fr);
  gap: 10px;
}

.recommendation-type-list {
  display: grid;
  gap: 9px;
}

.recommendation-type-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
}

.recommendation-type-option strong,
.recommendation-type-option small {
  display: block;
}

.recommendation-type-option small {
  color: #64748b;
}

.reviewer-recommendation-list {
  display: grid;
  gap: 10px;
  max-height: min(460px, 55vh);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.reviewer-recommendation-list::-webkit-scrollbar {
  width: 6px;
}

.reviewer-recommendation-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.reviewer-recommendation-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.reviewer-recommendation-list::-webkit-scrollbar-track {
  background: transparent;
}

.reviewer-recommendation-item {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Finalized review banner */
.review-finalized-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid #059669;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.review-finalized-banner > i {
  color: #059669;
  font-size: 20px;
  margin-top: 2px;
}

.review-finalized-banner strong {
  display: block;
  color: #064e3b;
  font-size: 14px;
  margin-bottom: 4px;
}

.review-finalized-banner p {
  margin: 0;
  color: #065f46;
  font-size: 13px;
  line-height: 1.5;
}

.review-finalized-badge {
  display: inline-block;
  background: #065f46;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  margin: 0 4px;
}

/* Disabled states inside a finalized review */
.review-panel-section[data-review-panel-section="inline"] .form-control:disabled,
.review-panel-section[data-review-panel-section="inline"] .form-select:disabled,
.review-panel-section[data-review-panel-section="inline"] textarea:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.review-panel-section[data-review-panel-section="inline"] .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.reviewer-recommendation-item p {
  margin: 6px 0;
  color: #111827;
}

.reviewer-recommendation-item small {
  color: #64748b;
}

.reviewer-messages-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: 12px;
  min-height: 680px;
}

.reviewer-message-tabs {
  gap: 26px;
  margin: 0 0 8px;
}

.conversation-list,
.chat-panel,
.conversation-details {
  min-width: 0;
}

.conversation-list > [data-reviewer-conversation-rows],
.conversation-list > [data-student-conversation-rows] {
  max-height: min(480px, 55vh);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.conversation-item {
  position: relative;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  background: transparent;
  text-align: left;
  padding: 12px;
  display: grid;
  gap: 3px;
}

.conversation-item.active {
  background: #f1f5f9;
}

.conversation-item strong {
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.conversation-item span,
.conversation-item small {
  color: #64748b;
  font-size: 12px;
}

.conversation-item em {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #111827;
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
}

.chat-message-list {
  min-height: min(500px, 45vh);
  max-height: min(520px, 60vh);
  overflow: auto;
  padding: 16px 0;
  display: grid;
  align-content: start;
  gap: 14px;
  scrollbar-gutter: stable;
}

.chat-message {
  max-width: 72%;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  background: #ffffff;
}

.chat-message.from-me {
  justify-self: end;
  background: #f8fafc;
}

/* System messages — centered, neutral, no bubble arrow */
.chat-message.chat-message-system {
  justify-self: center;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.chat-message.chat-message-system > i {
  color: #64748b;
  font-size: 13px;
  flex-shrink: 0;
}

.chat-message.chat-message-system > span {
  flex: 1;
}

.chat-message.chat-message-system > small {
  color: #94a3b8;
  font-size: 11px;
  white-space: nowrap;
}

.chat-message p {
  margin: 6px 0;
}

.chat-message small {
  color: #64748b;
}

.chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
}

.shared-file-list {
  display: grid;
  gap: 10px;
  scrollbar-gutter: stable;
}

/* ============================================================
   Conversation Details — scrollable shared files list
   ============================================================ */
.conversation-details .shared-file-list {
  max-height: min(320px, 45vh);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}

.conversation-details .shared-file-list::-webkit-scrollbar {
  width: 6px;
}

.conversation-details .shared-file-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.conversation-details .shared-file-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.conversation-details .shared-file-list::-webkit-scrollbar-track {
  background: transparent;
}

.shared-file-item {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.shared-file-item small {
  display: block;
  color: #64748b;
}

.student-panel-content {
  display: block;
}

.student-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}

.student-dashboard-wireframe {
  max-width: 100%;
}

.student-dashboard-wireframe .student-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}

.student-dashboard-submissions-card {
  padding: 14px 12px 14px;
}

.student-dashboard-submissions-card h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.student-dashboard-table {
  table-layout: fixed;
  margin-bottom: 0;
}

.student-dashboard-table th,
.student-dashboard-table td {
  vertical-align: middle;
}

.student-dashboard-table th {
  font-size: 9px;
  padding: 7px 10px;
}

.student-dashboard-table td {
  padding: 10px 10px;
}

.student-dashboard-table th:nth-child(1),
.student-dashboard-table td:nth-child(1) {
  width: 27%;
}

.student-dashboard-table th:nth-child(2),
.student-dashboard-table td:nth-child(2) {
  width: 39%;
}

.student-dashboard-table th:nth-child(3),
.student-dashboard-table td:nth-child(3) {
  width: 19%;
}

.student-dashboard-table th:nth-child(4),
.student-dashboard-table td:nth-child(4) {
  width: 15%;
  text-align: center;
}

.student-dashboard-table td strong {
  font-size: 12px;
  line-height: 1.35;
}

.student-dashboard-table td small {
  font-size: 10px;
}

.student-dashboard-table .btn {
  min-width: 82px;
  padding: 6px 7px;
  font-size: 9px;
  font-weight: 800;
}

.student-stats-grid .stat-card small {
  display: block;
  margin-top: 14px;
  text-align: right;
  color: #64748b;
  font-size: 12px;
}

.student-submissions-table th:nth-child(1),
.student-submissions-table td:nth-child(1) {
  width: 27%;
}

/* ============================================================
   Student — action buttons alignment
   ============================================================ */
.student-submissions-table td:last-child,
.student-dashboard-table td:last-child {
  text-align: center;
  white-space: nowrap;
}

.student-row-action {
  min-width: 145px;
  text-align: center;
  justify-content: center;
}

.student-submissions-table th:nth-child(2),
.student-submissions-table td:nth-child(2) {
  width: 38%;
}

.student-submissions-table th:nth-child(3),
.student-submissions-table td:nth-child(3) {
  width: 18%;
}

.student-submissions-table th:nth-child(4),
.student-submissions-table td:nth-child(4) {
  width: 17%;
  text-align: center;
}

.student-submissions-table td strong,
.student-submissions-table td small {
  display: block;
}

.student-submissions-table td small {
  color: #64748b;
  margin-top: 4px;
  font-size: 11px;
}

.student-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  align-items: start;
  min-width: 360px;
}

.student-dashboard-table .student-progress {
  min-width: 300px;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
}

.student-progress span {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #6b7280;
  font-size: 10px;
  text-align: center;
}

.student-dashboard-table .student-progress span {
  gap: 4px;
  font-size: 9px;
}

.student-progress span::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #d1d5db;
  z-index: 0;
}

.student-progress span:first-child::before {
  display: none;
}

.student-dashboard-table .student-progress span::before {
  top: 6px;
}

.student-progress i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #9ca3af;
  background: #ffffff;
  position: relative;
  z-index: 1;
}

.student-dashboard-table .student-progress i {
  width: 14px;
  height: 14px;
}

.student-dashboard-table .student-progress .current i::after,
.student-dashboard-table .student-progress .complete i::after {
  left: 4px;
  top: 2px;
}

.student-progress .complete::before,
.student-progress .current::before {
  background: #111827;
}

.student-progress .complete i,
.student-progress .current i {
  background: #111827;
  border-color: #111827;
}

.student-progress .current i::after,
.student-progress .complete i::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 5px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.student-status {
  display: inline-block;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.student-status-pending {
  color: #1d4ed8;
  background: #dbeafe;
}

.student-status-review,
.student-status-revision {
  color: #b45309;
  background: #fef3c7;
}

.student-status-rejected {
  color: #991b1b;
  background: #fee2e2;
}

.student-status-published {
  color: #15803d;
  background: #dcfce7;
}

/* Rejected manuscripts show a single terminal state, not a 4-step timeline */
.student-progress.student-progress-rejected {
  grid-template-columns: 1fr;
  min-width: 0;
}

.student-progress-rejected span.rejected i {
  background: #dc2626;
  border-color: #dc2626;
}

.student-progress-rejected span.rejected i::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 5px;
  background: #ffffff;
  border-radius: 50%;
}

.student-progress-rejected span.rejected small {
  color: #991b1b;
  font-weight: 700;
}

.student-progress-rejected span.rejected::before {
  display: none;
}

.student-submit-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 0;
}

.student-submit-wireframe .student-submit-layout {
  grid-template-columns: 170px minmax(0, 1fr);
}

.student-stepper {
  border: 1px solid #e6eef0;
  border-right: 0;
  border-radius: 7px 0 0 7px;
  background: #ffffff;
  padding: 24px 18px;
  display: grid;
  align-content: start;
  gap: 26px;
  box-shadow: 0 2px 6px rgba(18, 35, 28, 0.08);
}

.student-submit-wireframe .student-stepper {
  padding: 22px 18px;
  gap: 28px;
  border-radius: 7px 0 0 7px;
  box-shadow: 0 2px 6px rgba(18, 35, 28, 0.08);
}

.student-submit-wireframe .student-stepper span {
  align-items: center;
  font-size: 12px;
}

.student-stepper span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

.student-stepper i,
.student-form-section h4 span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  border: 1px solid #9ca3af;
  font-style: normal;
  font-size: 12px;
}

.student-stepper .active i,
.student-form-section h4 span {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.student-submit-card {
  border-radius: 0 7px 7px 0;
}

.student-submit-wireframe .student-submit-card {
  padding: 0;
  overflow: hidden;
}

.student-submit-card-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 18px 24px;
}

.student-submit-card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.student-submit-form {
  padding: 16px 24px 20px;
}

.student-form-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 18px;
  margin-top: 18px;
}

.student-submit-wireframe .student-form-section {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.student-submit-wireframe .student-form-section + .student-form-section {
  border-top: 1px solid #e5e7eb;
  margin-top: 18px;
  padding-top: 18px;
}

.student-form-section h4 {
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.student-submit-wireframe .student-form-section h4 {
  font-size: 13px;
  margin-bottom: 14px;
}

.student-upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) 280px;
  gap: 30px;
}

.student-submit-wireframe .student-upload-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 44px;
  align-items: stretch;
}

/* ============================================================
   Student submit form — file upload notices
   ============================================================ */
.student-upload-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 12px;
}

.student-upload-notice > i {
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 2px;
}

.student-upload-notice strong {
  font-weight: 700;
}

/* Muted info strip — for file-type and size requirements */
.student-upload-notice-info {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #64748b;
  color: #334155;
}

.student-upload-notice-info > i {
  color: #64748b;
}

/* Warning banner — for the double-blind policy notice */
.student-upload-notice-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 3px solid #d97706;
  color: #78350f;
}

.student-upload-notice-warning > i {
  color: #d97706;
}

/* Tighter spacing when stacked below the dropzone grid on narrow screens */
@media (max-width: 640px) {
  .student-upload-notice {
    font-size: 11px;
    padding: 9px 12px;
  }
}

.student-dropzone {
  border: 2px dashed #9ca3af;
  border-radius: 5px;
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
}

.student-dropzone.dropzone-active {
  border-color: #1B4D2E;
  background: rgba(27, 77, 46, 0.06);
}

/* Dropzone has a file staged */
.student-dropzone.has-file {
  border-color: #1B4D2E;
  border-style: solid;
  background: rgba(27, 77, 46, 0.06);
}

/* File name — bolder when a file is chosen */
#studentFileName.has-file {
  font-weight: 600;
  color: #1B4D2E;
}

/* Progress bar — green tint when complete */
#studentUploadProgress.complete {
  background-color: #1B4D2E;
}

.student-submit-wireframe .student-dropzone {
  min-height: 176px;
}

.student-submit-wireframe .student-dropzone strong,
.student-submit-wireframe .student-dropzone small {
  font-size: 12px;
}

.student-dropzone > i {
  font-size: 42px;
  color: #6b7280;
}

.student-selected-file {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 18px;
}

.student-submit-wireframe .student-selected-file {
  min-height: 176px;
  padding: 18px 20px;
}

.student-selected-file h5 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 18px;
}

.student-metadata-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px 30px;
}

.student-submit-wireframe .form-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
}

/* Small helper text below an input — used by the Keywords and References fields. */
.student-submit-wireframe .student-form-hint {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
}

/* Abstract and References both span the full width of the metadata grid. */
.student-submit-wireframe .student-abstract-field,
.student-submit-wireframe .student-references-field {
  grid-column: 1 / -1;
}

.student-submit-wireframe .form-control {
  min-height: 34px;
  font-size: 12px;
}

.student-submit-wireframe textarea.form-control {
  min-height: 92px;
}

/* Abstract gets a taller dedicated height so authors can proofread without
   scrolling inside the field. Overrides the shared textarea rule above. */
.student-submit-wireframe textarea.student-abstract-input {
  min-height: 260px;
  resize: vertical;
}

/* Single-line-style textareas that auto-grow as the author types.
   Used by Title and Keywords. The JS sets inline height on input;
   these rules keep the box from showing an inner scrollbar and let
   long unbroken words wrap instead of overflowing horizontally. */
.student-submit-wireframe textarea.student-growable-input {
  min-height: 34px;
  padding: 6px 12px;
  line-height: 1.45;
  resize: vertical;
  overflow-y: hidden;
  word-break: break-word;
}

.student-authors-heading {
  margin-top: 22px;
}

.student-authors-table th,
.student-authors-table td {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 12px;
}

.student-selected-file > div:first-of-type {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-selected-file span {
  flex: 1;
  font-size: 13px;
}

.keyword-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.student-submit-wireframe .keyword-chip-row {
  gap: 8px;
  margin-top: 10px;
}

.keyword-chip-row span {
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.student-submit-wireframe .keyword-chip-row span {
  padding: 5px 10px;
  font-size: 12px;
}

.student-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 20px;
}

.student-submit-wireframe .student-form-actions {
  border-top: 1px solid #e5e7eb;
  margin-top: 18px;
  padding-top: 18px;
  gap: 16px;
}

.student-submit-wireframe .student-form-actions .btn {
  min-width: 115px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
}

.student-feedback-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 0;
}

.student-feedback-list {
  border-radius: 7px 0 0 7px;
}

/* ============================================================
   Student — Reviews & Feedback left list scroll zone
   ============================================================ */
.student-feedback-scroll {
  max-height: min(480px, 55vh);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.student-feedback-scroll::-webkit-scrollbar {
  width: 6px;
}

.student-feedback-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.student-feedback-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.student-feedback-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.student-feedback-detail {
  border-left: 0;
  border-radius: 0 7px 7px 0;
}

.student-feedback-item {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  padding: 14px 34px 14px 14px;
  text-align: left;
  position: relative;
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.student-feedback-item.active {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.student-feedback-item strong {
  font-size: 13px;
}

.student-feedback-item span,
.student-feedback-item small {
  color: #64748b;
  font-size: 12px;
}

.student-feedback-item i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.student-messages-layout {
  grid-template-columns: 285px minmax(0, 1fr) 280px;
  gap: 0;
}

.student-messages-layout .conversation-list {
  border-radius: 7px 0 0 7px;
}

.student-messages-layout .chat-panel {
  border-left: 0;
  border-radius: 0;
}

.student-conversation-details {
  border-left: 0;
  border-radius: 0 7px 7px 0;
}

.student-chat-input-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reviewer-review-layout,
  .reviewer-messages-layout,
  .reviewer-dashboard-panels {
    grid-template-columns: 1fr;
  }

  .student-stats-grid,
  .student-submit-layout,
  .student-feedback-layout,
  .student-upload-grid,
  .student-messages-layout {
    grid-template-columns: 1fr;
  }

  .reviewer-side-grid {
    grid-template-columns: 1fr;
  }

  .reviewer-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    min-height: auto;
  }

  .dashboard-main {
    padding: 22px 16px 32px;
  }

  .dashboard-header {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .activity-item {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .activity-item time {
    grid-column: 2;
  }
}

.review-comment-box {
  transition: all 0.2s ease;
  border-left: 4px solid #1B4D2E;
}

.review-comment-box:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Form improvements */
.form-select-sm, .form-control-sm {
  font-size: 0.875rem;
}

.btn-sm {
  font-size: 0.875rem;
}

/* Table improvements */
.table-hover tbody tr:hover {
  background-color: rgba(27, 77, 46, 0.05);
  cursor: pointer;
}

/* Custom button colors to match CCA theme */
.btn-success {
  background-color: #1B4D2E;
  border-color: #1B4D2E;
}

.btn-success:hover {
  background-color: #0D3520;
  border-color: #0D3520;
}

.btn-outline-success {
  color: #1B4D2E;
  border-color: #1B4D2E;
}

.btn-outline-success:hover {
  background-color: #1B4D2E;
  border-color: #1B4D2E;
}

.text-success {
  color: #1B4D2E !important;
}

.bg-success {
  background-color: #1B4D2E !important;
}

.badge.text-bg-success {
  background-color: #1B4D2E !important;
}

/* Public journal download button styles */
.journal-card .btn-group {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.journal-card:hover .btn-group {
  opacity: 1;
}

.journal-card .btn-sm {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

/* User management table styles font size and padding*/
.user-management-table td,
.user-management-table th {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
}

.user-management-table td:first-child {
  font-weight: 500;
}

/* role font size adjustment */
.user-management-table .badge {
  font-size: 0.9rem;
  padding: 0.4em 0.7em;
  font-weight: 500;
}


/* Public page — compact */
.public-hero {
  padding: 1.5rem 1.5rem !important;
}

.public-hero .text-uppercase {
  font-size: 0.75rem;
  margin-bottom: 0.25rem !important;
}

.public-hero h1.display-6 {
  font-size: 1.75rem;
  font-weight: 700;
}

.public-hero .badge {
  font-size: 0.7rem;
  padding: 0.35em 0.65em;
}

.public-hero p.text-muted {
  font-size: 0.875rem;
  margin-bottom: 0 !important;
}

/* all Dashboard header h2 font weight adjustment */
.dashboard-header h2 {
  font-weight: 500;
}

/* Stat card labels — identical for admin and reviewer */
.admin-overview .stat-card p,
.reviewer-stat-card p {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.admin-overview .stat-link,
.reviewer-stat-card .stat-link {
  font-size: 13px;
}

/* Reviewer reminder list styles */
.reviewer-reminder-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.reviewer-reminder {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.35;
}

.reviewer-reminder i {
  margin-top: 2px;
  font-size: 13px;
}

.reviewer-reminder-danger {
  background: #fee2e2;
  color: #991b1b;
}

.reviewer-reminder-warning {
  background: #fef3c7;
  color: #92400e;
}

.reviewer-reminder-info {
  background: #dbeafe;
  color: #1e40af;
}

.reviewer-reminder-empty {
  background: #dcfce7;
  color: #166534;
  font-style: italic;
}

/* Reviewer Status guide table inside Guidelines & Resources */
.status-guide-table {
  font-size: 12px;
}

.status-guide-table th {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid #e5e7eb;
  padding: 6px 8px;
}

.status-guide-table td {
  padding: 8px;
  vertical-align: top;
  color: #111827;
  border-color: #e5e7eb;
}

.status-guide-table td:first-child {
  width: 90px;
  white-space: nowrap;
}

.status-guide-table .reviewer-status {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
}

/* User management table header styles */
.user-management-table thead th {
  color: #35373a;         /* gray — swap for text-muted color if you prefer */
  font-weight: 500;       /* light */
}

/* ============================================================
   Admin list modals — fullscreen inside the content area,
   leaving the sidebar visible on the left.
   ============================================================ */
.modal-dialog.modal-admin-fullscreen {
  width: calc(100vw - 180px);
  max-width: none;
  height: 100vh;
  margin: 0 0 0 180px;
}

.modal-dialog.modal-admin-fullscreen .modal-content {
  height: 100%;
  border: 0;
  border-radius: 0;
}

@media (max-width: 760.98px) {
  .modal-dialog.modal-admin-fullscreen {
    width: 100vw;
    margin-left: 0;
  }
}

/* 
   Dashboard views (admin, student, faculty, editor) — denser layout.
   Scoped to body.dashboard-active, which is toggled for every
   authenticated user in render() and removed on logout.
   Change the zoom value to taste (0.8 = smaller, 1 = default).
*/
body.dashboard-active .dashboard-main {
  zoom: 0.8;
}

/* ============================================================
   Public page — same density as the dashboard panels.
   Scoped to body.public-view-active so authenticated views
   are unaffected.
   ============================================================ */
body.public-view-active #authSection {
  zoom: 0.8;
}

/* ============================================================
   Student submission form — Privacy consent checkbox
   ============================================================ */
.student-privacy-consent-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.student-privacy-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 12px;
  line-height: 1.55;
  color: #334155;
  cursor: pointer;
}

.student-privacy-consent input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #1B4D2E;
  cursor: pointer;
}

.student-privacy-consent > span {
  flex: 1;
}

.student-privacy-consent:has(input:checked) {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.student-privacy-consent input[type="checkbox"]:checked ~ span {
  color: #1B4D2E;
  font-weight: 500;
}

/* ============================================================
   Public page — Information card (For Authors / For Reviewers)
   Stacked below the login/register card in the right column.
   ============================================================ */
.public-info-card {
  background: #ffffff;
}

.public-info-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1B4D2E;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.public-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.public-info-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 5px;
  text-align: left;
  color: #1f2937;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
  cursor: pointer;
}

.public-info-link i {
  font-size: 12px;
  color: #1B4D2E;
  width: 14px;
  text-align: center;
}

.public-info-link:hover,
.public-info-link:focus-visible {
  background: #eaf8ef;
  color: #1B4D2E;
  outline: none;
}

.public-info-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(27, 77, 46, 0.25);
}

/* ============================================================
   Public page — Research News Feed
   The feed is appended inside #publicJournalList (a Bootstrap
   .row) after the journal cards. These rules ensure long titles
   and abstracts wrap instead of overflowing the card.
   ============================================================ */
.news-feed-container {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.news-feed-item {
  min-width: 0;
  overflow: hidden;
}

.news-feed-item > .d-flex {
  min-width: 0;
}

.news-feed-item > .d-flex > .flex-grow-1 {
  min-width: 0;
}

.news-feed-item h4 {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.news-feed-item p {
  overflow-wrap: anywhere;
  word-break: break-word;
  margin-bottom: 0;
}

.news-feed-item .text-muted {
  font-size: 11px;
}

/* ============================================================
   Public page — Publication detail view (#publication/<id>)
   ============================================================ */
.publication-view-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 0 40px;
}

.publication-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #1B4D2E;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 5px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.publication-back-btn:hover,
.publication-back-btn:focus-visible {
  background: rgba(255, 255, 255, 0.85);
  outline: none;
}

.publication-back-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(27, 77, 46, 0.25);
}

.publication-view-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(16, 34, 24, 0.08);
  padding: 34px 40px 40px;
  color: #1f2937;
}

.publication-notice {
  text-align: center;
  padding: 30px 0 20px;
}

.publication-notice h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px;
}

.publication-notice p {
  color: #64748b;
  font-size: 13px;
  margin: 0;
}

.publication-article {
  min-width: 0;
}

.publication-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 22px;
  margin-bottom: 24px;
}

.publication-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1B4D2E;
  margin: 0 0 8px;
}

.publication-title {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.publication-authors {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
}

.publication-author,
.publication-date {
  font-size: 13px;
  color: #475569;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.publication-author i,
.publication-date i {
  color: #94a3b8;
  font-size: 12px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.publication-author-role {
  display: inline-block;
  background: #eaf8ef;
  color: #1B4D2E;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.publication-date {
  margin-bottom: 6px;
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.publication-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.publication-section {
  margin-bottom: 26px;
}

.publication-section h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1B4D2E;
  margin: 0 0 10px;
}

.publication-abstract {
  font-size: 14.5px;
  line-height: 1.7;
  color: #1f2937;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin: 0;
}

.publication-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.publication-keyword {
  background: #eaf8ef;
  color: #1B4D2E;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.publication-references {
  margin: 0;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #334155;
}

.publication-references li {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.forgot-password-lede {
  font-size: 13px;
  color: #475569;
  margin: 0 0 16px;
}

.forgot-password-note {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.forgot-password-note i {
  color: #94a3b8;
  margin-top: 2px;
}

.temp-password-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin: 14px 0;
}

.temp-password-display code {
  flex: 1;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: #0f172a;
  background: transparent;
  padding: 0;
  word-break: break-all;
  user-select: all;
}

.temp-password-display .btn {
  flex-shrink: 0;
}

.publication-footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 18px;
  margin-top: 30px;
}

.publication-cite {
  font-size: 12.5px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

@media (max-width: 640px) {
  .publication-view-card {
    padding: 24px 20px 28px;
  }

  .publication-title {
    font-size: 21px;
  }

  .publication-actions {
    flex-direction: column;
  }

  .publication-actions .btn {
    justify-content: center;
    width: 100%;
  }
}

/* ============================================================
   Public page — journal list pagination
   ============================================================ */
.public-journal-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 4px;
  margin-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.public-journal-page-info {
  font-size: 12px;
  color: #64748b;
}

.public-journal-page-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.public-page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  color: #1f2937;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  cursor: pointer;
}

.public-page-btn:hover:not(:disabled),
.public-page-btn:focus-visible {
  background: #eaf8ef;
  border-color: #1B4D2E;
  color: #1B4D2E;
  outline: none;
}

.public-page-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(27, 77, 46, 0.25);
}

.public-page-btn.active {
  background: #1B4D2E;
  border-color: #1B4D2E;
  color: #ffffff;
}

.public-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .public-journal-pagination {
    justify-content: center;
  }

  .public-journal-page-info {
    width: 100%;
    text-align: center;
  }
}

/* ============================================================
   Login form — Forgot password link and modal
   ============================================================ */
.login-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.login-forgot-link {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  color: #1B4D2E;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.login-forgot-link:hover,
.login-forgot-link:focus-visible {
  text-decoration: underline;
  color: #0D3520;
  outline: none;
}

.login-forgot-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(27, 77, 46, 0.25);
  border-radius: 3px;
}

.forgot-password-step-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1B4D2E;
  margin: 0 0 10px;
}

.forgot-password-steps {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: #1f2937;
}

.forgot-password-steps li {
  margin-bottom: 8px;
}

.forgot-password-steps a {
  color: #1B4D2E;
  font-weight: 600;
  text-decoration: none;
}

.forgot-password-steps a:hover {
  text-decoration: underline;
}

.forgot-password-steps code {
  background: #f1f5f9;
  color: #1B4D2E;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
}

/* ============================================================
   Password visibility toggle (eye icon inside input group)
   ============================================================ */
.password-toggle {
  border-color: var(--line);
  color: #6b7280;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: #1B4D2E;
  border-color: #1B4D2E;
  background: #eaf8ef;
  outline: none;
}

.password-toggle:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(27, 77, 46, 0.15);
}

.password-toggle i {
  font-size: 13px;
  pointer-events: none;
}

/* Ensure the input group's left input has consistent rounding */
.input-group > .form-control:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group > .password-toggle {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* ============================================================
   Account Settings modal — compact, centered, friendly
   ============================================================ */
.settings-modal-dialog {
  max-width: 420px;
  width: calc(100% - 2rem);
}

.settings-modal-content {
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 48px rgba(16, 34, 24, 0.18);
  overflow: hidden;
}

.settings-modal-header {
  border-bottom: 1px solid var(--line);
  padding: 18px 22px 14px;
  align-items: flex-start;
}

.settings-modal-header .modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px;
  line-height: 1.3;
}

.settings-modal-subtitle {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  padding-right: 12px;
}

.settings-modal-body {
  padding: 18px 22px 20px;
}

.settings-field {
  margin-bottom: 14px;
}

.settings-field .form-label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

.settings-field .form-control {
  font-size: 13px;
  border-radius: 6px;
  border-color: var(--line);
}

.settings-field .form-control:focus {
  border-color: rgba(27, 77, 46, 0.5);
  box-shadow: 0 0 0 0.2rem rgba(27, 77, 46, 0.12);
}

.settings-hint {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-actions .btn {
  min-width: 92px;
  font-size: 12px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 480px) {
  .settings-modal-dialog {
    max-width: 100%;
    width: calc(100% - 1.25rem);
  }

  .settings-modal-header {
    padding: 16px 18px 12px;
  }

  .settings-modal-body {
    padding: 16px 18px 18px;
  }
}

/* ============================================================
   Admin empty states — used when a list has no rows.
   Matches the CCA green theme; no bright Bootstrap alert colors.
   ============================================================ */
.admin-section-heading {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0f172a;
  margin: 0 0 12px;
}

.admin-empty-state {
  background: var(--surface-soft, #f7faf7);
  border: 1px solid var(--line, #dbe8df);
  border-radius: 8px;
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.admin-empty-state-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #e8f4ec;
  color: #1B4D2E;
  font-size: 18px;
  margin-bottom: 4px;
}

.admin-empty-state-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
}

.admin-empty-state-text {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
  max-width: 340px;
}

@media (max-width: 480px) {
  .admin-empty-state {
    padding: 22px 16px;
  }
  .admin-empty-state-text {
    font-size: 11.5px;
  }
}

/* ============================================================
   Admin — Pending Approvals populated table (green theme,
   sticky header, scrollable for 30+ rows)
   ============================================================ */
.admin-pending-section {
  margin-bottom: 24px;
}

.admin-pending-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-pending-header .admin-section-heading {
  margin-bottom: 0;
}

.admin-pending-count {
  font-size: 11px;
  font-weight: 600;
  color: #1B4D2E;
  background: #e8f4ec;
  border: 1px solid #cbe4d4;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.admin-pending-table-wrapper {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--line, #dbe8df);
  border-radius: 8px;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.admin-pending-table-wrapper::-webkit-scrollbar {
  width: 8px;
}

.admin-pending-table-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.admin-pending-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.admin-pending-table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.admin-pending-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  color: #1f2937;
}

.admin-pending-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f8f5;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line, #dbe8df);
  white-space: nowrap;
}

.admin-pending-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #eef3f0;
  vertical-align: middle;
}

.admin-pending-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-pending-table tbody tr:hover {
  background: #fafdfb;
}

.admin-pending-cell-name {
  font-weight: 600;
  color: #0f172a;
}

.admin-pending-cell-email {
  color: #475569;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-pending-cell-date {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.admin-pending-badge {
  display: inline-block;
  min-width: 60px;
  text-align: center;
  background: #e8f4ec;
  color: #1B4D2E;
  border: 1px solid #cbe4d4;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.admin-pending-table thead th.admin-pending-col-actions {
  text-align: right;
}

.admin-pending-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.admin-pending-role-select {
  width: 110px;
  flex-shrink: 0;
  border-color: var(--line, #dbe8df);
  font-size: 12px;
}

.admin-pending-actions .btn {
  font-size: 11px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .admin-pending-table-wrapper {
    max-height: 340px;
  }
  .admin-pending-table thead th,
  .admin-pending-table tbody td {
    padding: 8px 10px;
  }
  .admin-pending-role-select {
    width: 92px;
  }
}

/* ============================================================
   Pending approvals — role cell stacking + inverted approve
   ============================================================ */

/* Requested Role cell: badge on top, role select below it. */
.admin-pending-cell-role {
  min-width: 130px;
  vertical-align: top;
}

.admin-pending-cell-role .admin-pending-badge {
  display: inline-block;
  margin-bottom: 6px;
}

.admin-pending-cell-role .admin-pending-role-select {
  display: block;
  width: 110px;
  border-color: var(--line, #dbe8df);
  font-size: 12px;
}

/* Actions cell now holds only two buttons. Keep them right-aligned. */
.admin-pending-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

/* Approve button: outlined by default, solid green on hover. */
.admin-pending-actions .btn-approve {
  background-color: #ffffff;
  border: 1px solid #1B4D2E;
  color: #1B4D2E;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-pending-actions .btn-approve:hover,
.admin-pending-actions .btn-approve:focus-visible {
  background-color: #1B4D2E;
  border-color: #1B4D2E;
  color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(27, 77, 46, 0.15);
}

/* Reject button: keep outlined red, sized to match. */
.admin-pending-actions .btn-outline-danger {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .admin-pending-cell-role {
    min-width: 110px;
  }
  .admin-pending-cell-role .admin-pending-role-select {
    width: 96px;
  }
}

/* ============================================================
   Admin — Assign Reviewer button (Total Manuscripts table)
   Compact green pill. Theme-consistent.
   ============================================================ */
.assign-reviewer-btn-compact {
  background-color: #1B4D2E;
  border: 1px solid #1B4D2E;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  padding: 5px 14px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.assign-reviewer-btn-compact:hover,
.assign-reviewer-btn-compact:focus-visible {
  background-color: #0D3520;
  border-color: #0D3520;
  color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(27, 77, 46, 0.15);
}

/* ============================================================
   Admin modal theme — Assign Reviewer (adds to existing
   .assign-reviewer-modal styles, does not replace them)
   ============================================================ */
.admin-modal-dialog {
  max-width: 600px;
  width: calc(100% - 2rem);
}

.admin-modal-content {
  border-radius: 12px;
  border: 1px solid var(--line, #dbe8df);
  overflow: hidden;
}

.admin-modal-header {
  border-bottom: 1px solid var(--line, #dbe8df);
  padding: 18px 22px 14px;
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.admin-modal-header .modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px;
  line-height: 1.3;
}

.admin-modal-subtitle {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  padding-right: 12px;
}

.admin-modal-body {
  padding: 18px 22px 16px;
}

.admin-modal-field {
  margin-bottom: 14px;
}

.admin-modal-field:last-child {
  margin-bottom: 0;
}

.admin-modal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

.admin-modal-readonly {
  background-color: #f7faf7;
  color: #1f2937;
}

.admin-modal-footer {
  border-top: 1px solid var(--line, #dbe8df);
  padding: 14px 22px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-modal-footer .btn {
  min-width: 92px;
  font-size: 12px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-modal-primary {
  background-color: #1B4D2E;
  border-color: #1B4D2E;
  color: #ffffff;
}

.admin-modal-primary:hover,
.admin-modal-primary:focus-visible {
  background-color: #0D3520;
  border-color: #0D3520;
  color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(27, 77, 46, 0.15);
}

@media (max-width: 480px) {
  .admin-modal-dialog {
    max-width: 100%;
    width: calc(100% - 1.25rem);
  }
  .admin-modal-header {
    padding: 16px 18px 12px;
  }
  .admin-modal-body {
    padding: 16px 18px 14px;
  }
  .admin-modal-footer {
    padding: 12px 18px 16px;
  }
}
