/** ./src/css/intranet-content.css */

/* =====================================================
   CONTENT VIEWS / CPT ARCHIVES / SHARED CONTENT MODULES

   Shared visual patterns for non-management content views:
   - news archive, taxonomy, search and cards
   - document and IT archive grids
   - document, IT and news single pages
   - employee directory cards and shared filter sidebars

   Important:
   - .doc-grid and .doc-tile are also used by /mi-panel/ dashboard components.
   - Do not place homepage-only CSS here. Use intranet-home.css.
   - Do not place RH/admin module CSS here. Use intranet-management.css.
   - Do not place time-clock CSS here. Use intranet-time-clock.css.
===================================================== */

/* =====================================================
   NEWS / AVISOS / ARCHIVES / SEARCH
===================================================== */
.news-actions {
  margin: 0;
}







.ena-news-card {
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 10px 12px 12px;
}

.ena-news-card .enernav-chip-row {
  margin: 8px 0;
}

.ena-news-card.ena-news-card--media {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.news-kicker {
  margin: 0 0 2px;
  font-size: var(--font-size-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.news-title {
  margin: 0 0 4px;
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: var(--line-height-snug);
}

.news-meta {
  margin: 0 0 6px;
  font-size: var(--font-size-2xs);
  color: var(--text-muted);
}

.news-thumb {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  text-decoration: none;
}

.news-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-thumb-placeholder {
  width: 100%;
  height: 140px;
  background: rgba(0, 0, 0, 0.06);
}

.ena-news-card-body {
  min-width: 0;
}





.text-excerpt {
  margin: 0;
  font-size: var(--font-size-sm);
}

/* =====================================================
   DOCUMENTS / IT / PILLS / TILES / SEARCH
===================================================== */
.doc-search-row {
  margin-top: 4px;
  margin-bottom: 8px;
}

.doc-search-form,
.it-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.doc-search-input,
.it-search-input {
  width: 100%;
  min-width: 220px;
  flex: 1 1 320px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  padding: 7px 12px;
  font-size: var(--font-size-sm);
  background: var(--bg-surface);
}

.doc-search-btn,
.it-search-btn {
  white-space: nowrap;
}

.it-search-select {
  min-width: 220px;
  flex: 0 0 auto;
}
/* .ena-it-support.ena-dashboard-module section.ena-panel{
  margin-top: 1rem;
} */

.doc-pill {
  text-align: left;
  padding: 7px 10px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  font-size: var(--font-size-xs);
  background: var(--bg-surface);
  cursor: pointer;
}

.doc-pill:hover {
  background: var(--en-blue);
  color: var(--en-white);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 16px;
}

.doc-tile {
  display: block;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.doc-tile:hover {
  transform: translateY(-1px);
  border-color: var(--en-blue);
  box-shadow: var(--shadow-card-hover);
}

.doc-tile:focus-visible {
  outline: 2px solid var(--en-blue);
  outline-offset: 3px;
}

.doc-tile__inner {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: start;
  padding: 12px;
}

.doc-tile__left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-tile__type {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--bg-surface-muted);
  font-size: var(--font-size-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.doc-tile__body {
  min-width: 0;
}

.doc-tile__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25;
}

.doc-tile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.doc-tile__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-size: var(--font-size-2xs);
  background: #f6fff6;
  color: var(--text-green-dark);
  font-weight: 600;
}

.doc-tile__chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: var(--font-size-2xs);
  background: var(--bg-surface);
  color: var(--text-muted);
}

.doc-tile__right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-tile__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: var(--font-size-xs);
  background: var(--bg-surface);
}

.doc-tile--downloadable .doc-tile__type {
  border-color: rgba(0, 123, 188, 0.35);
  background: rgba(0, 123, 188, 0.06);
}

.ena-hero-panel--terms .doc-terms-inline,
.home-hero-panel--terms .doc-terms-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.doc-term-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--bg-surface);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.doc-term-pill:hover {
  transform: translateY(-1px);
  border-color: var(--border-color);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
}

.doc-term-pill--compact .doc-term-pill__name {
  white-space: nowrap;
  line-height: 1;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.doc-term-pill--compact .doc-term-pill__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  font-size: var(--font-size-2xs);
  font-weight: 800;
  background: var(--bg-surface);
  color: var(--en-black);
}

.doc-term-pill--blue {
  border-color: rgba(0, 123, 188, 0.3);
  background: rgba(0, 123, 188, 0.06);
}

.doc-term-pill--green {
  border-color: rgba(73, 169, 66, 0.3);
  background: rgba(73, 169, 66, 0.08);
}

.doc-term-pill--orange {
  border-color: rgba(230, 146, 59, 0.4);
  background: rgba(230, 146, 59, 0.1);
}

.doc-term-pill--gray {
  border-color: rgba(0, 0, 0, 0.1);
  background: var(--bg-surface-soft-alt);
}

.doc-term-pill--ghost {
  border-color: var(--border-soft-3);
  background: transparent;
}

.doc-term-pill--dark {
  border-color: rgba(0, 0, 0, 0.22);
  background: var(--en-black);
  color: var(--en-white);
}

.doc-term-pill--dark .doc-term-pill__count {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: var(--en-white);
}

.doc-term-pill.is-active {
  border-color: var(--en-blue);
  background: var(--en-blue);
  color: var(--en-white);
}

.doc-term-pill.is-active .doc-term-pill__count {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: var(--en-white);
}

/* =====================================================
   SINGLE CONTENT PAGES / DOCUMENTOS / TI / NEWS
===================================================== */
.enernav-single-page {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.enernav-single-page__shell {
  display: grid;
  gap: 1rem;
}

.enernav-single-page__shell--split {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.35fr);
  align-items: start;
  gap: 1.25rem;
}

.enernav-single-page__sidebar {
  min-width: 0;
  height: 100%;
}

.enernav-single-page__sidebar-card {
  position: sticky;
  top: 68px;
  display: grid;
  gap: 1rem;
  padding: 1rem 0;
  border-radius: 0;
  border: 0;
}

.enernav-single-page__eyebrow {
  margin: 0;
  font-size: var(--font-size-2xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.enernav-single-page__title {
  margin: 0;
  line-height: 1.08;
  font-size: var(--font-size-5xl);
  font-weight: 650;
  text-wrap: balance;
}

.enernav-single-page__meta {
  display: grid;
  gap: 0.625rem;
}

.enernav-single-page__date {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border-soft-3);
  border-radius: 999px;
  background: var(--bg-surface);
  font-size: var(--font-size-xs);
  color: var(--text-muted-strong);
}

.enernav-single-page__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.enernav-single-page__media {
  overflow: hidden;
  border: 1px solid var(--border-soft-3);
  border-radius: var(--border-radius-md);
  background: var(--bg-surface-soft-alt);
}

.enernav-single-page__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.enernav-single-page__sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.enernav-single-page__main {
  min-width: 0;
  border-left: 1px solid var(--border-color);
  height: 100%;
}

.enernav-single-page__shell--split .enernav-single-page__content {
  border: 0;
}

.enernav-single-page__content {
  padding: 0;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-soft-3);
  background: var(--bg-surface);
  overflow: hidden;
}

.enernav-single-page__content-inner {
  padding: 1.75rem 1.75rem 2rem;
}

.enernav-single-page__content-inner > :first-child {
  margin-top: 0;
}

.enernav-single-page__content-inner > :last-child {
  margin-bottom: 0;
}

.enernav-single-page__content-inner h1,
.enernav-single-page__content-inner h2,
.enernav-single-page__content-inner h3,
.enernav-single-page__content-inner h4 {
  line-height: 1.15;
  font-weight: 650;
  color: var(--text-color);
}

.enernav-single-page__content-inner h1 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 3vw, 3.25rem);
}

.enernav-single-page__content-inner h2 {
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  font-size: clamp(1.5rem, 2vw, 2.25rem);
}

.enernav-single-page__content-inner h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 1.5vw, 1.75rem);
}

.enernav-single-page__content-inner h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
  font-size: var(--font-size-xl);
}

.enernav-single-page__content-inner p,
.enernav-single-page__content-inner ul,
.enernav-single-page__content-inner ol,
.enernav-single-page__content-inner table,
.enernav-single-page__content-inner blockquote {
  font-size: var(--font-size-lg);
  line-height: 1.7;
}

.enernav-single-page__content-inner p {
  margin: 0 0 1rem;
}

.enernav-single-page__content-inner ul,
.enernav-single-page__content-inner ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.enernav-single-page__content-inner li + li {
  margin-top: 0.375rem;
}

.enernav-single-page__content-inner strong {
  font-weight: 700;
}

.enernav-single-page__content-inner img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem 0;
  border-radius: var(--border-radius-md);
}

.enernav-single-page__content-inner table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
}

.enernav-single-page__content-inner table th,
.enernav-single-page__content-inner table td {
  padding: 0.75rem;
  border: 1px solid var(--border-soft-2);
  text-align: left;
  vertical-align: top;
}

.enernav-single-page__content-inner table th {
  background: var(--bg-surface-muted);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.enernav-single-page__content-inner blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1rem 1rem 1.125rem;
  border-left: 4px solid var(--en-green);
  border-radius: 0 12px 12px 0;
  background: var(--bg-surface-green-tint);
}

/* =====================================================
   DIRECTORY / SHARED FILTER SIDEBARS / EMPLOYEE CARDS
===================================================== */
.directory-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 16px;
}

.directory-main {
  flex: 1;
  min-width: 0;
}
.directory-main:has(.ena-news-card){
  display: grid;
  gap: 1rem;
}
.sidebar-filters {
  position: sticky;
  top: 80px;
  align-self: flex-start;
  width: 100%;
  padding: 16px 18px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--bg-surface);
}

.sidebar-header {
  margin-bottom: 12px;
}

.sidebar-title-main {
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: var(--line-height-snug);
}

.sidebar-description {
  margin: 4px 0 0;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.sidebar-section + .sidebar-section {
  margin-top: 18px;
}

.sidebar-title {
  margin-bottom: 6px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: var(--line-height-snug);
}

.sidebar-label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.sidebar-input {
  width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-size: var(--font-size-sm);
  background: var(--bg-surface);
}

.sidebar-checkbox-group {
  max-height: 170px;
  overflow: auto;
  padding: 8px 10px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--en-gray);
  background: var(--bg-surface-muted);
}

.sidebar-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: var(--font-size-xs);
}

.sidebar-checkbox input {
  accent-color: var(--en-black);
}

.sidebar-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.sidebar-form .sidebar-actions {
  margin-top: 12px;
}

.ena-sidebar-hint {
  margin-top: 10px;
  font-size: var(--font-size-2xs);
  color: var(--text-muted);
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 16px;
  align-items: stretch;
}

.employee-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 16px 18px 14px;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.employee-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.employee-header-text {
  flex: 1;
  min-width: 0;
}

.employee-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--en-black);
  font-size: var(--font-size-lg);
  font-weight: 700;
  background: var(--bg-surface-muted);
}

.employee-name {
  font-size: var(--font-size-lg);
  font-weight: 600;
  line-height: var(--line-height-snug);
}

.employee-name a {
  text-decoration: none;
}

.employee-name a:hover {
  color: var(--en-blue);
}

.employee-meta {
  margin-top: 4px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.employee-meta-small {
  font-size: var(--font-size-2xs);
  color: var(--text-muted);
}

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

.employee-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.employee-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.employee-card-data {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-soft-4);
  border-radius: 14px;
  background: var(--bg-surface-muted);
}

.card-section-label {
  margin-bottom: 4px;
  font-size: var(--font-size-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.employee-data-value {
  min-width: 0;
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.employee-data-value a {
  color: inherit;
  text-decoration: none;
}

.employee-data-value a:hover {
  color: var(--en-blue);
}

.employee-data-value-break {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.employee-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 2px;
}

.employee-footer-note {
  font-size: var(--font-size-2xs);
  color: var(--text-muted);
}

.employee-card-link {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--en-blue);
  text-decoration: none;
}

.employee-card-link:hover {
  text-decoration: underline;
}

/* =====================================================
   DIRECTORY / PAGE DIRECTORY (scoped under .page-directory)
===================================================== */

/* Results header */
.page-directory .directory-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background: var(--bg-surface-muted);
}

.page-directory .directory-results-header__summary {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.page-directory .directory-results-header__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-directory .directory-per-page-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-directory .directory-per-page-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

.page-directory .directory-per-page-select {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-size: var(--font-size-xs);
  background: var(--bg-surface);
  cursor: pointer;
}

/* Active filter pills */
.page-directory .directory-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.page-directory .directory-active-filters__label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.page-directory .directory-active-filters__pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  font-size: var(--font-size-xs);
  text-decoration: none;
  color: var(--text-body);
  transition: background 0.15s;
}

.page-directory .directory-active-filters__pill:hover {
  background: var(--bg-surface-muted);
}

.page-directory .directory-active-filters__clear {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 4px;
}

.page-directory .directory-active-filters__clear:hover {
  color: var(--text-body);
  text-decoration: underline;
}

/* Pagination */
.page-directory .directory-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.page-directory .directory-pagination a,
.page-directory .directory-pagination span.current,
.page-directory .directory-pagination span.dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: background 0.15s;
}

.page-directory .directory-pagination a {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-body);
}

.page-directory .directory-pagination a:hover {
  background: var(--bg-surface-muted);
}

.page-directory .directory-pagination span.current {
  border: 1px solid var(--en-black);
  background: var(--en-black);
  color: #fff;
  font-weight: 600;
}

.page-directory .directory-pagination span.dots {
  color: var(--text-muted);
  border: none;
  background: none;
  min-width: auto;
  padding: 0 4px;
}

/* Empty state */
.page-directory .directory-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 48px 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--bg-surface-muted);
  grid-column: 1 / -1;
}

.page-directory .directory-empty-state__title {
  font-size: var(--font-size-base);
  font-weight: 600;
}

.page-directory .directory-empty-state__text {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  max-width: 360px;
}

/* Employee card - directory context labeled fields */
.page-directory .employee-card-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.page-directory .employee-card-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft-4);
  border-radius: 10px;
  background: var(--bg-surface-muted);
  min-width: 0;
}

.page-directory .employee-card-field__label {
  font-size: var(--font-size-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.page-directory .employee-card-field__value {
  font-size: var(--font-size-sm);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Discrete empty value for missing contact data */
.employee-data-empty {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

/* Single-column contact grid when phone is hidden */
.page-directory .employee-card-grid--single {
  grid-template-columns: 1fr;
}

/* Responsive: collapse results header controls on small screens */
@media (max-width: 640px) {
  .page-directory .directory-results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-directory .directory-results-header__controls,
  .page-directory .directory-per-page-form {
    width: 100%;
  }

  .page-directory .directory-per-page-form {
    flex-wrap: wrap;
  }

  .page-directory .employee-card-main-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   DIRECTORY — ORG CHART (scoped)
===================================================== */

.page-directory .org-chart {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.page-directory .org-chart__section {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.page-directory .org-chart__section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft-3);
  background: var(--bg-surface);
}

.page-directory .org-chart__section-title {
  margin: 0;
  color: var(--text-color);
  font-size: var(--font-size-xl);
  font-weight: 650;
  line-height: var(--line-height-tight);
}

.page-directory .org-chart__section-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.page-directory .org-chart__section-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-soft-3);
  background: var(--bg-surface-muted);
  color: var(--text-muted-strong);
  font-size: var(--font-size-2xs);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.page-directory .org-chart__section-badge--linked {
  border-color: var(--en-green);
  background: var(--bg-surface-green-tint);
  color: var(--text-green-dark);
}

.page-directory .org-chart__section-badge--manual,
.page-directory .org-chart__section-badge--slots {
  border-color: var(--border-soft-3);
  background: var(--bg-surface-muted);
  color: var(--text-muted-strong);
}

.page-directory .org-chart__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  align-items: start;
  padding: 14px 16px 16px;
  background: var(--bg-surface-muted);
}

.page-directory .org-node {
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-soft-3);
  border-radius: var(--border-radius-md);
  background: var(--bg-surface);
}

.page-directory .org-node--employee {
  border-color: var(--border-color);
}

.page-directory .org-node--group {
  border-color: var(--en-blue);
}

.page-directory .org-node--role {
  border-color: var(--border-soft-3);
  background: var(--bg-surface-soft);
}

.page-directory .org-node--position {
  background: var(--bg-surface);
}

.page-directory .org-node--child {
  align-self: stretch;
  border-color: var(--border-soft-3);
  background: var(--bg-surface);
}

.page-directory .org-node__type {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border-soft-3);
  background: var(--bg-surface-muted);
  color: var(--text-muted-strong);
  font-size: var(--font-size-2xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.page-directory .org-node--employee .org-node__type {
  border-color: var(--en-green);
  background: var(--bg-surface-green-tint);
  color: var(--text-green-dark);
}

.page-directory .org-node--group .org-node__type {
  border-color: var(--en-blue);
  background: var(--bg-surface-blue-soft);
  color: var(--text-blue-dark);
}

.page-directory .org-node--position .org-node__type {
  border-color: var(--border-soft-3);
  background: var(--bg-surface-muted);
  color: var(--text-muted-strong);
}

.page-directory .org-node__title {
  color: var(--text-color);
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: var(--line-height-snug);
  overflow-wrap: anywhere;
}

.page-directory .org-node__link {
  color: inherit;
  text-decoration: none;
}

.page-directory .org-node__link:hover {
  color: var(--en-blue);
  text-decoration: none;
}

.page-directory .org-node__meta {
  color: var(--text-muted-strong);
  font-size: var(--font-size-xs);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.page-directory .org-node__meta--role {
  color: var(--text-color);
  font-weight: 600;
}

.page-directory .org-node__meta--empty {
  color: var(--text-muted);
}

.page-directory .org-node__info-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-self: stretch;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft-3);
}

.page-directory .org-node__info-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  min-width: 0;
}

.page-directory .org-node__info-label {
  color: var(--text-muted);
  font-size: var(--font-size-2xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.page-directory .org-node__info-value {
  color: var(--text-muted-strong);
  font-size: var(--font-size-xs);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.page-directory .org-node__employee-code--node {
  align-self: flex-end;
  margin-top: 2px;
}

.page-directory .org-node__slots {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft-3);
  background: var(--bg-surface-muted);
  color: var(--text-muted-strong);
  font-size: var(--font-size-2xs);
  font-weight: 700;
  line-height: 1.2;
}

.page-directory .org-node__children {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft-3);
}

.page-directory .org-node--group > .org-node__children {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.page-directory .org-node__details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft-3);
}

.page-directory .org-node__details-summary {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-soft-3);
  background: var(--bg-surface-muted);
  color: var(--text-muted-strong);
  font-size: var(--font-size-2xs);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.page-directory .org-node__details-summary:hover {
  border-color: var(--en-blue);
  color: var(--en-blue);
}

.page-directory .org-node__employee-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}

.page-directory .org-node__employee-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--border-soft-4);
  border-radius: 10px;
  background: var(--bg-surface);
  color: inherit;
  text-decoration: none;
}

.page-directory a.org-node__employee-row:hover {
  border-color: var(--en-blue);
  color: inherit;
}

.page-directory .org-node__employee-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.page-directory .org-node__employee-name {
  color: var(--text-color);
  font-size: var(--font-size-xs);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.page-directory .org-node__employee-meta {
  color: var(--text-muted-strong);
  font-size: var(--font-size-2xs);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.page-directory .org-node__employee-code {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid var(--border-soft-3);
  border-radius: 999px;
  background: var(--bg-surface-muted);
  color: var(--text-muted-strong);
  font-size: var(--font-size-2xs);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .page-directory .org-chart__section-header {
    flex-direction: column;
  }

  .page-directory .org-chart__section-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page-directory .org-chart__grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .page-directory .org-node--group > .org-node__children {
    grid-template-columns: 1fr;
  }

  .page-directory .org-node__employee-row {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   EMPLOYEE PROFILE HEADER
===================================================== */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--en-black);
  font-size: var(--font-size-4xl);
  font-weight: 600;
}

.profile-name {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  line-height: var(--line-height-snug);
}

.profile-role {
  margin-top: 2px;
  font-size: var(--font-size-sm);
}

.ena-employee-profile-meta-line {
  margin-top: 2px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* =====================================================
   EMPLOYEE PROFILE — LAYOUT
   All rules scoped under .ena-employee-profile.
   Does not override .hero-layout, .doc-grid, or
   .doc-tile globally.
===================================================== */

/* Two-column overview: main card + contact card. */
.ena-employee-profile__overview {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

/* Main card: identity + details. */
.ena-employee-profile__main-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 18px 20px 20px;
  border-radius: var(--border-radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}

/* Identity: avatar + name/role/chips. */
.ena-employee-profile__identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ena-employee-profile__avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--en-black);
  font-size: var(--font-size-xl);
  font-weight: 600;
  background: var(--bg-surface-muted);
}

.ena-employee-profile__identity-copy {
  min-width: 0;
}

.ena-employee-profile__name {
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: var(--line-height-snug);
}

.ena-employee-profile__role {
  margin-top: 2px;
  font-size: var(--font-size-sm);
  color: var(--text-muted-strong);
}

/* Details: compact DL grid replacing the heavy table. */
.ena-employee-profile__details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
}

.ena-employee-profile__detail {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft-4);
  border-radius: 10px;
  background: var(--bg-surface-muted);
  min-width: 0;
}

.ena-employee-profile__detail dt {
  font-size: var(--font-size-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.ena-employee-profile__detail dd {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Contact card (sticky aside). */
.ena-employee-profile__contact-card {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-muted);
}

.ena-employee-profile__contact-title {
  margin: 0 0 4px;
  font-size: var(--font-size-base);
  font-weight: 600;
}

.ena-employee-profile__contact-item {
  border-top: 1px solid var(--border-soft-3);
  padding-top: 8px;
}

.ena-employee-profile__contact-item:first-of-type {
  padding-top: 0;
  border-top: none;
}

.ena-employee-profile__contact-kicker {
  margin-bottom: 2px;
  font-size: var(--font-size-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ena-employee-profile__contact-value {
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: var(--line-height-snug);
  overflow-wrap: anywhere;
}

.ena-employee-profile__contact-value a {
  color: inherit;
  text-decoration: none;
}

.ena-employee-profile__contact-value a:hover {
  color: var(--en-blue);
}

.ena-employee-profile__contact-copy {
  margin-top: 2px;
  font-size: var(--font-size-2xs);
  color: var(--text-muted);
}

/* Documents section. */
.ena-employee-profile__documents {
  margin-top: 1.25rem;
}

.ena-employee-profile__documents-card {
  padding: 18px 20px 20px;
  border-radius: var(--border-radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}

.ena-employee-profile__documents-title {
  margin: 0 0 4px;
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.ena-employee-profile__documents-subtitle {
  margin: 0 0 1rem;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* Empty state card. */
.ena-employee-profile__empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  border: 1px dashed var(--border-soft);
  border-radius: var(--border-radius-md);
  background: var(--bg-surface-muted);
  text-align: center;
}

.ena-employee-profile__empty-state p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* Responsive: tablet — stack overview, unpin contact card. */
@media (max-width: 960px) {
  .ena-employee-profile__overview {
    grid-template-columns: 1fr;
  }

  .ena-employee-profile__contact-card {
    position: static;
  }
}

/* Read-only doc tiles in the profile summary: suppress hover affordance. */
.ena-employee-profile__documents .doc-tile {
  cursor: default;
}

.ena-employee-profile__documents .doc-tile:hover {
  transform: none;
  border-color: var(--border-color);
  box-shadow: none;
}

/* CTA link to the full documents module. */
.ena-employee-profile__documents-cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft-3);
}

/* Responsive: mobile — single-column details, tighter cards. */
@media (max-width: 640px) {
  .ena-employee-profile__details {
    grid-template-columns: 1fr;
  }

  .ena-employee-profile__main-card,
  .ena-employee-profile__documents-card {
    padding: 14px;
  }
}
