:root {
  --azul-bg: #2C5290;
  --card-bg: #ffffff;
  --text-principal: #0f172a;
  --text-secundario: #475569;
  --hover: #e0ecff;
  --borda: #e2e8f0;
}

html, body {
  background: var(--azul-bg) !important;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

.profile-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 70px 32px;
  position: relative;
  box-sizing: border-box;
}

.login-main-content {
  width: 100%;
  max-width: 1600px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.login-accessibility {
  position: absolute;
  top: 16px;
  right: 220px;
  display: flex;
  align-items: center;
  height: 40px;
  gap: 8px;
}

.login-accessibility .accessibility-buttons {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px;
}

:root[data-theme='dark'] html,
:root[data-theme='dark'] body,
:root.cc--darkmode html,
:root.cc--darkmode body {
  background: var(--hc-bg) !important;
}

:root[data-theme='dark'] .profile-title,
:root.cc--darkmode .profile-title,
:root[data-theme='dark'] .version-info,
:root.cc--darkmode .version-info {
  color: var(--hc-text) !important;
}

:root[data-theme='dark'] .profile-card,
:root.cc--darkmode .profile-card {
  background: var(--hc-surface) !important;
  color: var(--hc-text) !important;
  border: 1px solid var(--hc-border) !important;
  box-shadow: var(--hc-shadow) !important;
}

:root[data-theme='dark'] .profile-name,
:root.cc--darkmode .profile-name {
  color: var(--hc-text) !important;
}

:root[data-theme='dark'] .profile-tag,
:root.cc--darkmode .profile-tag {
  background: var(--hc-bg) !important;
  color: var(--hc-text) !important;
  border: 1px solid var(--hc-border) !important;
}

:root[data-theme='dark'] .avatar,
:root.cc--darkmode .avatar {
  box-shadow: var(--hc-shadow) !important;
  background: linear-gradient(135deg, #808080, #1e1e1e) !important;
}

.logo-top {
  margin: 0;
  padding-top: 20px;
  text-align: center;
}

.logo-top img {
  height: 220px;
  width: auto;
}

.profile-shell {
  width: 100%;
  background: transparent;
  text-align: center;
  padding-bottom: 20px;
}

.profile-title {
  color: #e2e8f0;
  font-size: 2rem;
  margin-bottom: 18px;
  margin-top: 0;
  letter-spacing: 0.2px;
  font-weight: 500;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--borda);
  border-radius: 16px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  color: var(--text-principal);
  border: none;
  font-family: inherit;
}

.profile-card:hover,
.profile-card:focus-visible {
  transform: translateY(-4px);
  border-color: #2c5290;
  box-shadow: 0 16px 32px rgba(44, 82, 144, 0.18);
  outline: none;
}

.profile-card:active {
  transform: scale(0.98);
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5b7bd5, #4864b8);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.avatar.aluno {
  background: linear-gradient(135deg, #5b7bd5, #4864b8);
}

.profile-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-principal);
}

.profile-tag {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #1d4ed8;
  border: 1px solid var(--borda);
}

.profile-tag.aluno {
  color: #1d4ed8;
}

.version-info {
  margin-top: 24px;
  color: #e2e8f0;
  font-size: 0.875rem;
}

/* Header do usuário logado - lado direito (igual ao sistema) */
.profile-user-header {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 40px;
}

.profile-user-header .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.profile-user-header:hover .user-avatar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.25));
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}

.profile-user-header .user-name {
  font-weight: 500;
  font-size: 0.95rem;
  color: #ffffff;
}

.user-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
  border: 3px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .profile-page { padding: 80px 20px 20px; }
  .login-main-content {
    gap: 30px;
    justify-content: flex-start;
  }
  .profile-user-header {
    position: absolute;
    top: 16px;
    right: 16px;
    height: 40px;
  }
  .login-accessibility {
    position: absolute;
    top: 16px;
    left: 16px;
    right: auto;
    height: 40px;
  }
  .logo-top {
    margin: 0;
    padding-top: 60px;
  }
  .logo-top img {
    height: 140px;
  }
  .profile-shell {
    padding-bottom: 20px;
  }
  .profile-title {
    font-size: 1.25rem;
    margin-bottom: 24px;
  }
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .profile-page {
    padding: 80px 40px 32px;
  }
  .login-main-content {
    gap: 30px;
  }
  .logo-top {
    margin: 0;
    padding-top: 30px;
  }
  .logo-top img {
    height: 180px;
  }
  .profile-title {
    font-size: 1.75rem;
  }
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
