@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Open+Sans:wght@400;600;700&family=Syne:wght@400;500;600;700;800&display=swap');

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Open Sans", sans-serif;
  color: #0F2B5B;
  background-color: #F8FAFE;
  line-height: 1.5;
  overflow-x: hidden;
}

h1 {
  font-family: "Open Sans", sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: 1269px;
  margin: 0 auto;
  padding: 0;
}

/* ===================== Header user menu (logged-in) ===================== */
.header-user {
  position: relative;
  flex-shrink: 0;
}

.header-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: #FFFFFF;
  border: 1px solid #E5E9F2;
  border-radius: 999px;
  font-family: "Open Sans", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #0F2B5B;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.header-user-trigger:hover {
  border-color: #C5D0E2;
  box-shadow: 0 4px 12px rgba(15, 43, 91, 0.06);
}

.header-user-trigger[aria-expanded="true"] {
  border-color: #1A4FBA;
  box-shadow: 0 0 0 3px rgba(26, 79, 186, 0.12);
}

.header-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A4FBA 0%, #0F2B5B 100%);
  color: #FFFFFF;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.header-user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-chevron {
  width: 10px;
  height: 6px;
  color: #6B7280;
  transition: transform 0.2s ease;
}

.header-user-trigger[aria-expanded="true"] .header-user-chevron {
  transform: rotate(180deg);
  color: #1A4FBA;
}

.header-user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: #FFFFFF;
  border: 1px solid #E5E9F2;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 43, 91, 0.14);
  padding: 8px;
  z-index: 1000;
}

.header-user-menu[hidden] {
  display: none;
}

.header-user-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 14px;
  border-bottom: 1px solid #EEF1F6;
  margin-bottom: 6px;
}

.header-user-menu-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A4FBA 0%, #0F2B5B 100%);
  color: #FFFFFF;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.header-user-menu-name {
  margin: 0 0 2px;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #0F2B5B;
  line-height: 1.2;
}

.header-user-menu-role {
  margin: 0;
  font-family: "DM Sans", "Open Sans", sans-serif;
  font-size: 12px;
  color: #6B7280;
  line-height: 1.2;
}

.header-user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: "DM Sans", "Open Sans", sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #0F2B5B;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.header-user-menu-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.header-user-menu-item:hover {
  background: #F1F5FB;
}

.header-user-menu-item--logout {
  color: #B91C1C;
}

.header-user-menu-item--logout:hover {
  background: #FEF2F2;
}

/* button_to wraps the button in a form; ensure it fills the menu width */
form .header-user-menu-item {
  width: 100%;
}

/* Mobile: in the burger nav, the user pill should fill width */
.header-cta-mobile .header-user {
  width: 100%;
}

.header-cta-mobile .header-user-trigger {
  width: 100%;
  justify-content: flex-start;
}

.header-cta-mobile .header-user-menu {
  position: static;
  margin-top: 8px;
  box-shadow: none;
  border-color: #EEF1F6;
}
