/* MyJEC360 modern portal chrome */
:root {
  --jec-brand: #97031c;
  --jec-brand-dark: #6f0215;
  --jec-ink: #1b1c1c;
  --jec-muted: #656b75;
  --jec-line: #e5e7eb;
  --jec-bg: #f5f7fb;
  --jec-panel: #ffffff;
}

body.portal-modern {
  background: var(--jec-bg);
  color: var(--jec-ink);
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  scrollbar-gutter: stable;
}

html:has(body.portal-modern) {
  scrollbar-gutter: stable;
}

body.portal-modern #header {
  min-height: 68px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--jec-line);
  box-shadow: 0 10px 30px rgba(21, 24, 33, 0.08);
  color: var(--jec-ink);
}

body.portal-modern #header .header-inner,
body.portal-modern .portal-header__inner {
  min-height: 68px;
}

body.portal-modern .portal-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 4px;
}

body.portal-modern #menu-trigger,
body.portal-modern .portal-menu-trigger {
  height: 68px;
  width: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  flex: 0 0 42px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--jec-brand);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

body.portal-modern .portal-menu-trigger:hover,
body.portal-modern .portal-menu-trigger.open {
  color: var(--jec-brand-dark);
}

body.portal-modern .portal-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

body.portal-modern .portal-logo img {
  display: block;
  width: auto;
  max-height: 60px;
  height: auto;
}

body.portal-modern .portal-header__context {
  min-width: 0;
  padding-left: 4px;
  border-left: 1px solid var(--jec-line);
}

body.portal-modern .portal-header__context strong,
body.portal-modern .portal-header__context span {
  display: block;
}

body.portal-modern .portal-header__context strong {
  color: var(--jec-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

body.portal-modern .portal-header__context span {
  max-width: 360px;
  color: var(--jec-muted);
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.portal-modern .portal-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}

body.portal-modern .portal-header__actions > li {
  position: relative;
}

body.portal-modern .top-menu > li > a,
body.portal-modern .top-menu > li .tm-icon,
body.portal-modern .portal-icon-btn {
  color: var(--jec-ink);
}

body.portal-modern .top-menu > li > a,
body.portal-modern .portal-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  line-height: 1;
  text-align: center;
}

body.portal-modern .top-menu > li > a:hover,
body.portal-modern .top-menu > li.open > a,
body.portal-modern .portal-icon-btn:hover,
body.portal-modern .portal-header__actions > li.open .portal-icon-btn {
  background: rgba(151, 3, 28, 0.1);
  color: var(--jec-brand);
  text-decoration: none;
}

body.portal-modern .portal-icon-btn i {
  font-size: 21px;
}

body.portal-modern .portal-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--jec-brand);
}

body.portal-modern .top-menu .dropdown-menu {
  border: 1px solid var(--jec-line);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(21, 24, 33, 0.14);
}

body.portal-modern .portal-dropdown {
  width: 320px;
  margin-top: 12px;
  padding: 0;
  border: 1px solid var(--jec-line);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(21, 24, 33, 0.16);
  overflow: hidden;
}

body.portal-modern .portal-dropdown__header {
  padding: 16px;
  border-bottom: 1px solid var(--jec-line);
  background: #fff;
}

body.portal-modern .portal-dropdown__header strong,
body.portal-modern .portal-dropdown__header span {
  display: block;
}

body.portal-modern .portal-dropdown__header strong {
  color: var(--jec-ink);
  font-size: 15px;
  font-weight: 800;
}

body.portal-modern .portal-dropdown__header span {
  margin-top: 3px;
  color: var(--jec-muted);
  font-size: 12px;
}

body.portal-modern .portal-notification {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  color: var(--jec-ink);
  border-bottom: 1px solid #f0f2f5;
}

body.portal-modern .portal-notification:hover,
body.portal-modern .portal-dropdown__footer:hover,
body.portal-modern .portal-profile-card__links a:hover {
  background: rgba(151, 3, 28, 0.07);
  color: var(--jec-brand);
  text-decoration: none;
}

body.portal-modern .portal-notification i {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(151, 3, 28, 0.1);
  color: var(--jec-brand);
  font-size: 18px;
  line-height: 34px;
  text-align: center;
}

body.portal-modern .portal-notification strong,
body.portal-modern .portal-notification small {
  display: block;
}

body.portal-modern .portal-notification strong {
  font-size: 13px;
  font-weight: 800;
}

body.portal-modern .portal-notification small {
  margin-top: 3px;
  color: var(--jec-muted);
  font-size: 12px;
  line-height: 1.4;
}

body.portal-modern .portal-dropdown__footer {
  display: block;
  padding: 13px 16px;
  color: var(--jec-brand);
  font-size: 13px;
  font-weight: 800;
}

body.portal-modern .portal-profile-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 5px 8px 5px 5px;
  border-radius: 14px;
  color: var(--jec-ink);
}

body.portal-modern .portal-profile-toggle:hover,
body.portal-modern .portal-header__actions > li.open .portal-profile-toggle {
  background: rgba(151, 3, 28, 0.1);
  color: var(--jec-brand);
  text-decoration: none;
}

body.portal-modern .portal-profile-toggle img,
body.portal-modern .portal-profile-card__head img {
  border-radius: 50%;
  object-fit: cover;
  background: #f3f4f6;
}

body.portal-modern .portal-profile-toggle img {
  width: 36px;
  height: 36px;
}

body.portal-modern .portal-profile-toggle strong,
body.portal-modern .portal-profile-toggle small {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.portal-modern .portal-profile-toggle strong {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

body.portal-modern .portal-profile-toggle small {
  color: var(--jec-muted);
  font-size: 11px;
  line-height: 1.3;
}

body.portal-modern .portal-profile-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(
    145deg,
    #43020f 0%,
    var(--jec-brand) 58%,
    #c0062a 100%
  );
  color: #fff;
}

body.portal-modern .portal-profile-card__head img {
  width: 54px;
  height: 54px;
  border: 3px solid rgba(255, 255, 255, 0.7);
}

body.portal-modern .portal-profile-card__head strong,
body.portal-modern .portal-profile-card__head span {
  display: block;
}

body.portal-modern .portal-profile-card__head strong {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

body.portal-modern .portal-profile-card__head span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

body.portal-modern .portal-profile-card__meta {
  display: flex;
  gap: 9px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--jec-line);
  color: var(--jec-muted);
  font-size: 12px;
  line-height: 1.4;
}

body.portal-modern .portal-profile-card__links {
  padding: 8px;
}

body.portal-modern .portal-profile-card__links a,
body.portal-modern .portal-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--jec-ink);
  font-size: 13px;
  font-weight: 700;
}

body.portal-modern .portal-profile-card__links i,
body.portal-modern .portal-logout i {
  width: 18px;
  color: var(--jec-brand);
  font-size: 18px;
  text-align: center;
}

body.portal-modern .portal-logout {
  margin: 0 8px 8px;
  border-top: 1px solid var(--jec-line);
  color: #9b1c2f;
}

body.portal-modern .portal-logout:hover {
  background: #fff1f2;
  color: #9b1c2f;
  text-decoration: none;
}

body.portal-modern #sidebar {
  background: #ffffff;
  border-right: 1px solid var(--jec-line);
  box-shadow: 10px 0 30px rgba(21, 24, 33, 0.05);
}

body.portal-modern .main-menu {
  padding: 12px 12px 18px;
}

body.portal-modern .main-menu > li > a,
body.portal-modern .main-menu > li.sub-menu > a {
  display: flex;
  position: relative;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  padding: 12px 28px 12px 14px;
  border-radius: 12px;
  color: #34383f;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
}

body.portal-modern .main-menu > li > a > i,
body.portal-modern .main-menu > li.sub-menu > a > i {
  position: static;
  flex: 0 0 24px;
  width: 24px;
  padding: 0;
  color: var(--jec-brand);
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

body.portal-modern .main-menu > li > a:hover,
body.portal-modern .main-menu > li.sub-menu > a:hover {
  background: rgba(151, 3, 28, 0.08);
  color: var(--jec-brand);
}

body.portal-modern .main-menu > li.active > a,
body.portal-modern .main-menu > li.active-nested > a {
  background: rgba(151, 3, 28, 0.12);
  color: var(--jec-brand);
  font-weight: 800;
}

body.portal-modern .main-menu > li.sub-menu > ul {
  margin: 2px 0 8px 22px;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--jec-teal);
}

body.portal-modern .main-menu > li.sub-menu > ul > li > a {
  display: block;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--jec-muted);
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
}

body.portal-modern .sub-menu > a:before,
body.portal-modern .sub-menu > a:after {
  top: 50%;
  right: 2px;
  margin-top: -6px;
  color: var(--jec-panel);
  background: var(--jec-teal);
  line-height: 9px;
  padding: 3px;
  border-radius: 12px;
  font-size: small;
}

body.portal-modern .main-menu > li.sub-menu > ul > li > a:hover {
  background: rgba(151, 3, 28, 0.07);
  color: var(--jec-brand);
}

body.portal-modern #main {
  min-height: 100vh;
  padding-bottom: 0;
}

body.portal-modern #content {
  min-height: calc(100vh - 100px);
}

body.portal-modern #content > .container {
  display: flex;
  min-height: calc(100vh - 100px);
  flex-direction: column;
}

body.portal-modern .portal-footer {
  margin: auto 0 4px;
  padding: 16px 4px 4px;
  border-top: 1px solid var(--jec-line);
  color: var(--jec-muted);
  font-size: 12px;
}

body.portal-modern .portal-footer strong {
  color: var(--jec-ink);
}

body.portal-modern.portal-page-calendar .portal-calendar-shell {
  display: grid;
  gap: 16px;
  padding-bottom: 18px;
}

body.portal-modern.portal-page-calendar .portal-calendar-hero,
body.portal-modern.portal-page-calendar .portal-calendar-card {
  border: 1px solid var(--jec-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 36px rgba(21, 24, 33, 0.08);
}

body.portal-modern.portal-page-calendar .portal-calendar-hero {
  padding: 22px 24px;
}

body.portal-modern.portal-page-calendar .portal-calendar-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--jec-brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.portal-modern.portal-page-calendar .portal-calendar-hero h1 {
  margin: 0;
  color: var(--jec-ink);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}

body.portal-modern.portal-page-calendar .portal-calendar-hero p {
  margin: 8px 0 0;
  color: var(--jec-muted);
}

body.portal-modern.portal-page-calendar .portal-calendar-card {
  min-height: 620px;
  padding: 16px;
  overflow: hidden;
}

body.portal-modern.portal-page-calendar #calendar {
  min-height: 590px;
}

body.portal-modern.portal-page-calendar .fc {
  color: var(--jec-ink);
}

body.portal-modern.portal-page-calendar .fc .fc-toolbar {
  gap: 12px;
  margin-bottom: 14px;
}

body.portal-modern.portal-page-calendar .fc .fc-toolbar-title {
  font-size: 22px;
  font-weight: 800;
}

body.portal-modern.portal-page-calendar .fc .fc-button {
  border: 1px solid var(--jec-line);
  border-radius: 10px;
  background: #ffffff;
  color: #34383f;
  box-shadow: none;
  font-weight: 800;
  text-transform: capitalize;
}

body.portal-modern.portal-page-calendar .fc .fc-button:hover,
body.portal-modern.portal-page-calendar .fc .fc-button:focus,
body.portal-modern.portal-page-calendar .fc .fc-button-primary:not(:disabled).fc-button-active {
  border-color: rgba(151, 3, 28, 0.22);
  background: rgba(151, 3, 28, 0.08);
  color: var(--jec-brand);
}

body.portal-modern.portal-page-calendar .fc .fc-daygrid-day.fc-day-today,
body.portal-modern.portal-page-calendar .fc .fc-timegrid-col.fc-day-today {
  background: rgba(151, 3, 28, 0.05);
}

body.portal-modern.portal-page-calendar .fc .fc-event {
  border: 0;
  border-radius: 8px;
  padding: 2px 4px;
}

body.portal-modern.portal-page-calendar .modal-content {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 20px 54px rgba(21, 24, 33, 0.22);
}

body.portal-modern.portal-page-calendar .modal-title {
  font-weight: 800;
}

body.portal-modern.portal-page-calendar #eventDetailsModal .modal-body .d-flex {
  gap: 12px;
}

@media (max-width: 991px) {
  body.portal-modern.portal-page-calendar .fc .fc-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  body.portal-modern.portal-page-calendar .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  body.portal-modern.portal-page-calendar .portal-calendar-hero,
  body.portal-modern.portal-page-calendar .portal-calendar-card {
    border-radius: 14px;
  }

  body.portal-modern.portal-page-calendar .portal-calendar-hero {
    padding: 18px;
  }

  body.portal-modern.portal-page-calendar .portal-calendar-hero h1 {
    font-size: 26px;
  }

  body.portal-modern.portal-page-calendar .portal-calendar-card {
    min-height: 560px;
    padding: 10px;
  }

  body.portal-modern.portal-page-calendar #calendar {
    min-height: 540px;
  }
}

@media (max-width: 767px) {
  body.portal-modern .portal-header__inner {
    gap: 8px;
    padding: 0 10px;
  }

  body.portal-modern #menu-trigger,
  body.portal-modern .portal-menu-trigger {
    display: flex;
  }

  body.portal-modern #content {
    padding-top: 8px;
  }

  body.portal-modern #content,
  body.portal-modern #content > .container {
    min-height: calc(100vh - 108px);
  }

  body.portal-modern .top-menu > li > a {
    width: 38px;
    height: 38px;
    margin-top: 15px;
    line-height: 38px;
  }

  body.portal-modern .portal-logo img {
    max-width: 112px;
    max-height: 48px;
  }

  body.portal-modern .portal-dropdown {
    width: calc(100vw - 24px);
    right: -4px;
  }

  body.portal-modern .portal-profile-toggle {
    min-height: 40px;
    padding: 2px;
  }
}
