/* Portal — professional workspace layout */

.portal-body {
  min-height: 100vh;
}

.portal-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 36px clamp(16px, 4vw, 40px) 72px;
}

/* —— Page shell (replaces heavy auth-card look) —— */
.portal-page {
  width: 100%;
}

.portal-page-head {
  margin-bottom: 28px;
}

.portal-page-head h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.8vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f8fafc;
  line-height: 1.2;
}

.portal-page-head .subcopy {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.page-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}

/* —— Sign in page —— */
.auth-page {
  max-width: 480px;
  margin: 24px auto 0;
  padding: 32px 28px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(15, 24, 41, 0.72);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0 8px;
}

.auth-actions .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.demo-box {
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--muted);
}

.demo-box summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 10px 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.demo-box summary::-webkit-details-marker {
  display: none;
}

.demo-box[open] summary {
  margin-bottom: 4px;
}

/* —— Request / choose service page —— */
.request-page {
  max-width: 720px;
  margin: 0 auto;
}

.request-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.request-head-actions {
  flex-shrink: 0;
  padding-top: 4px;
}

/* Vertical professional service list */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 18px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(15, 24, 41, 0.65);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.service-row:hover {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(18, 32, 52, 0.95);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.service-row:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.service-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.service-badge-student {
  background: rgba(45, 212, 191, 0.12);
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.22);
}

.service-badge-hr {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.22);
}

.service-badge-trainer {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.22);
}

.service-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.service-body strong {
  display: block;
  color: #f8fafc;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.service-body span {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 450;
}

.service-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
  padding: 6px 0 6px 8px;
}

.service-row:hover .service-cta {
  color: #99f6e4;
}

.request-note {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.text-link {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: #93c5fd;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-link:hover {
  color: #bfdbfe;
}

/* —— Form panel after role pick —— */
.request-form-panel {
  margin-top: 28px;
  padding: 24px 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(15, 24, 41, 0.72);
}

.request-form-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.request-form-head h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.2rem;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.request-form-head .subcopy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 48ch;
}

.request-fields {
  grid-column: 1 / -1;
}

.auth-form .full {
  grid-column: 1 / -1;
}

.doc-block {
  margin-top: 4px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.doc-block > strong {
  color: #f8fafc;
  display: block;
  margin-bottom: 10px;
  font-size: 13.5px;
  font-weight: 600;
}

.doc-block label {
  margin-bottom: 10px;
}

.doc-block input[type="file"] {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink-soft);
  font-size: 13px;
  width: 100%;
}

/* —— Nav bits —— */
.nav-user {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-nav {
  flex-wrap: wrap;
}

.portal-nav .nav-secondary {
  color: var(--muted) !important;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.portal-nav .nav-secondary:hover {
  color: #fff !important;
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.portal-body .nav-toggle {
  display: none !important;
}

@media (max-width: 640px) {
  .portal-nav a:not(.nav-secondary) {
    display: none;
  }
  .portal-nav a[href="/"] {
    display: inline-flex;
  }

  .service-row {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .service-cta {
    display: none;
  }

  .auth-page {
    margin-top: 8px;
    padding: 24px 18px;
  }
}

/* —— Dashboard —— */
.dash-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.dash-header h1 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.panel-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(15, 24, 41, 0.72);
  padding: 16px;
}

.panel-card h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 1.02rem;
  color: #f8fafc;
  font-weight: 650;
}

.panel-card.wide {
  grid-column: 1 / -1;
}

.list-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  margin-bottom: 10px;
}

.list-row strong {
  color: #f8fafc;
}

.list-row .meta {
  color: var(--muted);
  font-size: 12.5px;
}

.list-row .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
}

.grade-A { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
.grade-B { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
.grade-C { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }

.tech-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}

.tech-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.chat-box {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.chat-msg {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  font-size: 13px;
}

.chat-msg .who {
  font-size: 11px;
  font-weight: 700;
  color: #5eead4;
  margin-bottom: 4px;
}

.chat-msg.me .who {
  color: #93c5fd;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal.hidden {
  display: none !important;
}

.modal-card {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #0f1829;
  padding: 20px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.empty {
  color: var(--muted);
  font-size: 13.5px;
  padding: 8px 0;
}

@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

/* Legacy class aliases if any residual markup */
.auth-card {
  max-width: 720px;
  margin: 0 auto;
}
.auth-wide {
  max-width: 720px;
}
.role-grid {
  display: none;
}
.enroll-panel {
  /* replaced by request-form-panel */
}
