* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #f5f7fb;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
  color: #172033;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10000;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ffffff;
  color: #061a3a;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid #061a3a;
}

.skip-link:focus {
  top: 16px;
}

.app-shell {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 320px;
  background: #ffffff;
  border-right: 1px solid #dfe5ee;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.brand,
.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: #00d1c7;
  color: white;
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-card,
.status-card,
.auth-panel {
  background: #f8fafc;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  padding: 12px;
}

.info-card label,
.auth-panel label {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
  color: #666;
}

.info-card input,
.auth-panel input {
  width: 100%;
  padding: 10px;
  border: 1px solid #dfe5ee;
  border-radius: 6px;
}

.primary-btn,
.secondary-btn,
.primary-link-btn {
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.primary-btn,
.primary-link-btn {
  background: #00d1c7;
  color: #061a3a;
  font-weight: 800;
  margin-top: 14px;
}

.secondary-btn {
  background: #2d3748;
  color: white;
}

.back-link {
  color: #2d3748;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

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

.status-dot {
  width: 10px;
  height: 10px;
  background: orange;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.email-status,
.form-status,
.session-empty,
.muted {
  color: #667085;
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.4;
}

.login-contact {
    text-align: center;
    margin-top: 24px;
}

.whatsapp-link {
    display: inline-block;
    transition: transform 0.2s ease;
}

.whatsapp-link:hover {
    transform: scale(1.1);
}

.whatsapp-icon {
    width: 38px;
    height: 38px;
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.session-link {
  text-align: left;
  border: 1px solid #dfe5ee;
  background: white;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #172033;
}

.session-link:hover,
.session-link:focus-visible {
  background: #e6fffb;
}

.info-card-title {
  font-size: 14px;
  color: #172033;
  margin-bottom: 8px;
}

.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 20px;
  background: white;
  border-bottom: 1px solid #dfe5ee;
}

.chat-header h2 {
  margin-bottom: 6px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.chat-messages[aria-busy="true"] {
  background: #f8fafc;
}

.message {
  max-width: 900px;
  margin-bottom: 18px;
}

.message-role {
  font-weight: bold;
  margin-bottom: 8px;
}

.message-content {
  background: white;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.user-message .message-content {
  background: #e6fffb;
}

.chat-input-area {
  border-top: 1px solid #dfe5ee;
  background: white;
  padding: 16px;
  display: flex;
  gap: 12px;
}

.chat-input-area textarea {
  flex: 1;
  resize: none;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #dfe5ee;
}

.chat-input-area button {
  width: 140px;
  border: none;
  border-radius: 8px;
  background: #00d1c7;
  color: #061a3a;
  font-weight: 800;
  cursor: pointer;
}

.chat-input-area button:disabled,
.chat-input-area textarea:disabled,
.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input-area textarea[aria-invalid="true"] {
  border-color: #b42318 !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #061a3a !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(0, 209, 199, 0.35) !important;
}

[aria-invalid="true"] {
  border-color: #b42318 !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18);
}

/* Portal */
.portal-page {
  min-height: 100vh;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.portal-card {
  width: min(1500px, 100%);
  background: white;
  border: 1px solid #dfe5ee;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 18px 48px rgba(23, 32, 51, 0.08);
}

.portal-brand {
  margin-bottom: 28px;
}

.portal-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.interface-title.computer-title {
    margin-top: 70px;
    margin-bottom: 55px;
}

.interface-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: #172033;
    margin: 20px 0 30px;
}
.interface-grid.computer-mode {
  grid-template-columns: repeat(5, 270px);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.interface-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 220px));
  gap: 20px;
  justify-content: center;
}

.interface-card {
  border: 1px solid #dfe5ee;
  border-radius: 14px;
  padding: 18px;
  background: #f8fafc;
  color: #172033;
  text-decoration: none;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.interface-card:hover,
.interface-card:focus-visible {
  border-color: #00d1c7;
  background: #e6fffb;
}

.interface-card h3 {
  margin-bottom: 10px;
}

.interface-card p {
  color: #667085;
  line-height: 1.45;
}

.interface-card span {
  color: #006b66;
  font-weight: bold;
}

.future-card {
  border-style: dashed;
  background: linear-gradient(180deg, #f8fafc 0%, #f4f7fb 100%);
}

.future-card h3 {
  color: #31415f;
}

.future-card span {
  color: #008f89;
}


@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #dfe5ee;
    max-height: 45vh;
  }

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

  .portal-user-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat-input-area {
    flex-direction: column;
  }

  .chat-input-area button {
    width: 100%;
    min-height: 44px;
  }
}


/* Updated EVA Portal landing page */
.portal-brand h1 {
  font-size: 30px;
  line-height: 1.15;
  color: #172033;
}

.portal-brand p {
  margin-top: 6px;
  font-size: 16px;
  color: #344054;
  font-weight: 600;
}

.portal-description {
  margin-top: 12px;
  color: #667085;
  line-height: 1.6;
  max-width: 720px;
  font-size: 15px;
}

.portal-welcome {
  font-size: 24px;
  font-weight: 700;
  color: #172033;
  margin-bottom: 6px;
}

.portal-course-title {
  margin-top: 6px;
  font-size: 1.25rem;
  font-weight: 700;
 
  color: #172033;
}

.portal-course-semester {
  margin-top: 4px;
  color: #53627a;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}

.portal-course-user {
  color: #667085;
  font-size: 14px;
  line-height: 1.4;
}

.portal-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #dfe5ee;
  text-align: center;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
}

.interface-card h3 {
  font-size: 20px;
  line-height: 1.25;
}

.interface-card span {
  margin-top: 16px;
}

.interface-grid.mobile-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

/* Review Past Sessions card */
.interface-card.review-card {
  background: linear-gradient(180deg, #f8fafc 0%, #eefdfb 100%);
  border-color: rgba(0, 209, 199, 0.35);
}

.interface-card.review-card h3 {
  color: #0f766e;
}

.portal-actions {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 20px;
}

.logout-bottom-btn {
  min-width: 180px;
}
.portal-footer {
    margin-top: 10px;
}

#loginPanel {
  max-width: 460px;
  margin: 40px auto 0;
  padding: 28px;
}

#loginPanel h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 8px;
}

#loginPanel .muted {
  text-align: center;
  margin-bottom: 22px;
}

#loginPanel .primary-btn {
  width: 100%;
  margin-top: 22px;
}

.login-welcome {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #007a75;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}


.interface-reminder {
    text-align: center;
    margin: 24px 0 32px;
}

.interface-icons {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.interface-reminder-title {
    font-size: 1rem;
    font-weight: 600;
    color: #061A3A;
    margin-bottom: 8px;
}

.interface-reminder-text {
    max-width: 520px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #5f6b84;
}



@media (min-width: 721px) {


  .mobile-top-section,
  .mobile-bottom-section {
      display: contents;
  }

  .auth-panel {
        max-width: 550px;
        margin: 50px auto;
    }

  #loginPanel {
    max-width: 550px;
    margin: 50px auto;
    padding: 32px;
  }

  #loginPanel input,
  #loginPanel button {
    width: 100%;
  }


 
}

@media (max-width: 720px) {

  .mobile-top-section,
  .mobile-bottom-section {
      background: white;
      border: 1px solid #dfe5ee;
      border-radius: 18px;
      margin: 16px;
      padding: 24px;
      box-shadow: 0 12px 32px rgba(23,32,51,.08);
  }

  .mobile-top-section {
      height: 95dvh;
  }

  .mobile-bottom-section {
      min-height: 60vh;
  }

  .interface-icons {
      font-size: 1.5rem;
      gap: 18px;
  }

  .interface-reminder-title {
      font-size: 0.95rem;
  }

  .interface-reminder-text {
      font-size: 0.85rem;
      padding: 0 16px;
  }

  .logo {
      width: 42px;
      height: 42px;
      font-size: 18px;
      border-radius: 10px;
  }

  .portal-brand h1 {
      font-size: 22px;
  }

  .portal-course-title {
      font-size: 1rem;
  }

  .portal-description {
      font-size: 14px;
      line-height: 1.5;
  }

  .portal-brand {
      margin-top: 30px;
  }


  .portal-page {
    padding: 0;
    display: block;
  }

  .portal-card {
    width: 100%;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .interface-title {
    font-size: 1.5rem;
    margin: 10px 0 24px;
    font-weight: 700;
  }


  .interface-grid.mobile-layout {
    max-width: 100%;
  }

  .portal-brand {
    margin-top: 0;
    margin-bottom: 24px;
  }

  .portal-footer {
    margin-top: 24px;
  }

 body:has(#loginPanel:not(.hidden)) .portal-page {
    padding: 24px 16px;
  }

  body:has(#loginPanel:not(.hidden)) .portal-card {
    background: white;
    border: 1px solid #dfe5ee;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 18px 48px rgba(23, 32, 51, 0.08);
  }


  #loginPanel {
    max-width: 100%;
    margin: 24px 0 0;
    padding: 22px;
  }

  #loginPanel h2 {
    font-size: 1.6rem;
  }

  body:has(#loginPanel:not(.hidden)) #portalHeaderBlock {
      display: flex;
      margin: 0 0 24px 0;
  }

  body:has(#loginPanel:not(.hidden)) .portal-brand {
      align-items: center;
  }

  body:has(#loginPanel:not(.hidden)) .portal-brand h1 {
      font-size: 24px;
      line-height: 1.15;
  }

  body:has(#loginPanel:not(.hidden)) .portal-description {
      display: block;
      font-size: 14px;
      line-height: 1.5;
  }

  .whatsapp-icon {
    width: 34px;
    height: 34px;
  }

  .login-access-links {
    margin-top: 22px;
    gap: 0;
  }

  .login-access-link.computer-only-access,
  .computer-only-access {
    display: none !important;
  }

  .login-access-link {
    width: 104px;
    min-height: 68px;
  }
}


/* LOGIN QUICK ACCESS LINKS START */
.login-access-links {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
  margin-top: 26px;
  text-align: center;
}

.login-access-link {
  width: 92px;
  min-height: 74px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  color: #53627a;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 8px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-access-link:hover,
.login-access-link:focus-visible {
  color: #061a3a;
  background: #f8fffe;
  border-color: rgba(0, 209, 199, 0.35);
  box-shadow: 0 10px 24px rgba(0, 209, 199, 0.12);
  transform: translateY(-2px);
}

.login-access-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #e6fffb;
  color: #006b66;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}

.login-access-label {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.15;
  color: #53627a;
}

.login-access-link:hover .login-access-label,
.login-access-link:focus-visible .login-access-label {
  color: #061a3a;
}

.whatsapp-access-link .whatsapp-icon {
  width: 38px;
  height: 38px;
}

/* Hide login icon text labels */
.login-access-label {
  display: none !important;
}

/* LOGIN QUICK ACCESS LINKS END */



@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .device-choice-btn:hover,
  .device-choice-btn:focus-visible,
  .interface-card:hover,
  .interface-card:focus-visible,
  .login-access-link:hover,
  .login-access-link:focus-visible,
  .whatsapp-link:hover {
    transform: none !important;
  }
}
