/* PSWU HRMS — EternalPeace-style design system (ep-*) */

:root,
[data-theme="light"] {
  color-scheme: light;
  --ep-surface-base: #f2f6f5;
  --ep-surface-sidebar: #ffffff;
  --ep-surface-card: #ffffff;
  --ep-surface-elevated: #e9f1ef;
  --ep-surface-input: #ffffff;
  --ep-text-primary: #10211d;
  --ep-text-muted: #57726b;
  --ep-border: #cfddd9;
  --ep-brand: #007570;
  --ep-brand-hover: #044e46;
  --ep-brand-muted: rgb(0 117 112 / 0.12);
  --ep-success: #16a34a;
  --ep-success-muted: rgb(34 197 94 / 0.12);
  --ep-warning: #d97706;
  --ep-warning-muted: rgb(217 119 6 / 0.12);
  --ep-danger: #dc2626;
  --ep-danger-muted: rgb(220 38 38 / 0.12);
  --ep-info: #0e7490;
  --ep-info-muted: rgb(14 116 144 / 0.12);
  --ep-overlay: rgb(16 33 29 / 0.4);
  --ep-white: #ffffff;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ep-surface-base: #0b1312;
  --ep-surface-sidebar: #101918;
  --ep-surface-card: #16211f;
  --ep-surface-elevated: #1f2d2a;
  --ep-surface-input: #1a2624;
  --ep-text-primary: #e9f3f0;
  --ep-text-muted: #93aaa2;
  --ep-border: #2b3b37;
  --ep-brand: #4db8a6;
  --ep-brand-hover: #7bcfc0;
  --ep-brand-muted: rgb(77 184 166 / 0.18);
  --ep-success: #22c55e;
  --ep-success-muted: rgb(34 197 94 / 0.15);
  --ep-warning: #f59e0b;
  --ep-warning-muted: rgb(245 158 11 / 0.15);
  --ep-danger: #ef4444;
  --ep-danger-muted: rgb(239 68 68 / 0.15);
  --ep-info: #38bdf8;
  --ep-info-muted: rgb(56 189 248 / 0.15);
  --ep-overlay: rgb(0 0 0 / 0.6);
  --ep-white: #e9f3f0;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  background: var(--ep-surface-base);
  color: var(--ep-text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

a {
  color: var(--ep-brand);
  text-decoration: none;
}

a:hover {
  color: var(--ep-brand-hover);
  text-decoration: underline;
}

[x-cloak] {
  display: none !important;
}

/* Shell */
.ep-shell {
  min-height: 100vh;
}

@media (min-width: 1024px) {
  .ep-shell {
    padding-left: 16rem;
  }
}

.ep-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--ep-overlay);
}

@media (min-width: 1024px) {
  .ep-mobile-overlay {
    display: none !important;
  }
}

.ep-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 16rem;
  border-right: 1px solid var(--ep-border);
  background: var(--ep-surface-sidebar);
  transition: transform 0.2s ease;
}

@media (max-width: 1023px) {
  .ep-sidebar {
    transform: translateX(-100%);
  }

  .ep-sidebar.is-open {
    transform: translateX(0);
  }
}

.ep-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--ep-border);
  padding: 1.25rem 1.25rem;
}

.ep-sidebar-mark {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ep-border);
  overflow: hidden;
}

.ep-sidebar-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[data-theme="dark"] .ep-sidebar-mark {
  color: #0d1210;
}

.ep-sidebar-brand p {
  margin: 0;
}

.ep-sidebar-brand .title {
  font-weight: 700;
  color: var(--ep-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ep-sidebar-brand .tag {
  font-size: 0.75rem;
  color: var(--ep-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ep-sidebar nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
}

.ep-nav-label {
  margin: 0 0 0.5rem;
  padding: 0 0.75rem;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ep-text-muted);
}

.ep-nav-group {
  margin-bottom: 1.25rem;
}

.ep-nav-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.125rem;
}

.ep-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: var(--ep-text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.ep-nav-link:hover {
  background: var(--ep-surface-elevated);
  color: var(--ep-text-primary);
  text-decoration: none;
}

.ep-nav-link-active {
  background: var(--ep-brand-muted);
  color: var(--ep-brand);
  font-weight: 500;
}

.ep-nav-link-active:hover {
  background: var(--ep-brand-muted);
  color: var(--ep-brand);
}

.ep-nav-link svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.ep-sidebar-foot {
  border-top: 1px solid var(--ep-border);
  padding: 1rem;
}

.ep-sidebar-foot .name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ep-sidebar-foot .role {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--ep-text-muted);
}

.ep-main {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.ep-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--ep-border);
  background: color-mix(in srgb, var(--ep-surface-base) 95%, transparent);
  backdrop-filter: blur(8px);
}

.ep-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem;
}

@media (min-width: 1024px) {
  .ep-header-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.ep-header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ep-text-primary);
}

.ep-header .sub {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  color: var(--ep-text-muted);
}

.ep-content {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .ep-content {
    padding: 1.5rem;
  }
}

/* Components */
.ep-input,
.ep-select,
.ep-textarea {
  width: 100%;
  border: 1px solid var(--ep-border);
  border-radius: 0.5rem;
  background: var(--ep-surface-input);
  color: var(--ep-text-primary);
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
}

.ep-input:focus,
.ep-select:focus,
.ep-textarea:focus {
  outline: none;
  border-color: var(--ep-brand);
  box-shadow: 0 0 0 1px var(--ep-brand);
}

.ep-textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.ep-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ep-text-muted);
}

.ep-field {
  margin-bottom: 1rem;
}

.ep-btn-primary,
.ep-btn-secondary,
.ep-btn-danger,
.ep-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}

.ep-btn-primary {
  background: var(--ep-brand);
  color: var(--ep-white);
}

a.ep-btn-primary {
  color: var(--ep-white);
}

[data-theme="dark"] .ep-btn-primary,
[data-theme="dark"] a.ep-btn-primary {
  color: #0d1210;
}

.ep-btn-primary:hover,
a.ep-btn-primary:hover {
  background: var(--ep-brand-hover);
  text-decoration: none;
  color: var(--ep-white);
}

[data-theme="dark"] .ep-btn-primary:hover,
[data-theme="dark"] a.ep-btn-primary:hover {
  color: #0d1210;
}

.ep-btn-secondary,
a.ep-btn-secondary {
  border-color: var(--ep-border);
  background: var(--ep-surface-elevated);
  color: var(--ep-text-primary);
}

.ep-btn-secondary:hover {
  background: var(--ep-surface-card);
  text-decoration: none;
}

.ep-btn-danger {
  background: var(--ep-danger);
  color: #fff;
}

.ep-btn-ghost {
  background: transparent;
  color: var(--ep-text-muted);
}

.ep-btn-ghost:hover {
  background: var(--ep-surface-elevated);
  color: var(--ep-text-primary);
}

.ep-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border-radius: 0.5rem;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-card);
  color: var(--ep-text-muted);
  cursor: pointer;
}

.ep-btn-icon:hover {
  color: var(--ep-brand);
  border-color: var(--ep-brand);
}

.ep-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
  flex-shrink: 0;
}

.ep-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  vertical-align: middle;
}

.ep-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 0.5rem;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-card);
  color: var(--ep-text-muted);
  cursor: pointer;
  text-decoration: none;
  line-height: 0;
  vertical-align: middle;
}

.ep-action:hover {
  color: var(--ep-brand);
  border-color: var(--ep-brand);
  background: var(--ep-surface-elevated);
}

.ep-action-danger {
  color: var(--ep-danger, #b42318);
}

.ep-action-danger:hover {
  color: #fff;
  background: var(--ep-danger, #b42318);
  border-color: var(--ep-danger, #b42318);
}

.ep-action-success {
  color: var(--ep-success, #027a48);
}

.ep-action-success:hover {
  color: #fff;
  background: var(--ep-success, #027a48);
  border-color: var(--ep-success, #027a48);
}

.ep-action-primary {
  color: var(--ep-brand);
}

.ep-action-primary:hover {
  color: #fff;
  background: var(--ep-brand);
  border-color: var(--ep-brand);
}

.ep-btn-block {
  width: 100%;
}

.ep-card {
  border-radius: 0.75rem;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-card);
  padding: 1.25rem;
}

.ep-card h2,
.ep-card h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ep-text-primary);
}

.ep-link {
  color: var(--ep-brand);
}

.ep-link:hover {
  color: var(--ep-brand-hover);
  text-decoration: underline;
}

.ep-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.ep-badge-brand {
  background: var(--ep-brand-muted);
  color: var(--ep-brand);
}

.ep-badge-success {
  background: var(--ep-success-muted);
  color: var(--ep-success);
}

.ep-badge-warning {
  background: var(--ep-warning-muted);
  color: var(--ep-warning);
}

.ep-badge-danger {
  background: var(--ep-danger-muted);
  color: var(--ep-danger);
}

.ep-badge-info {
  background: var(--ep-info-muted);
  color: var(--ep-info);
}

.ep-badge-muted {
  background: var(--ep-surface-elevated);
  color: var(--ep-text-muted);
}

.ep-chart-wrap {
  position: relative;
  min-height: 260px;
  margin-top: 0.75rem;
}

.ep-chart-wrap canvas {
  width: 100% !important;
  height: 260px !important;
}

.ep-dashboard-kpis {
  margin-top: 1rem;
}

.ep-stat-note,
.ep-chart-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--ep-text-muted);
}

.ep-stat-money {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.ep-chart-subtitle {
  margin-top: -0.65rem;
}

.ep-chart-empty {
  display: grid;
  min-height: 260px;
  margin-top: 0.75rem;
  place-items: center;
  padding: 1.5rem;
  border: 1px dashed var(--ep-border);
  border-radius: 0.75rem;
  background: var(--ep-surface-elevated);
  color: var(--ep-text-muted);
  text-align: center;
  font-size: 0.875rem;
}

.ep-empty {
  border-radius: 0.75rem;
  border: 1px dashed var(--ep-border);
  background: var(--ep-surface-elevated);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ep-text-muted);
}

.ep-locked {
  border-radius: 0.75rem;
  border: 1px dashed var(--ep-warning);
  background: var(--ep-warning-muted);
  padding: 2rem;
  text-align: center;
}

.ep-table-wrap {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-card);
}

.ep-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.ep-table thead {
  background: var(--ep-surface-elevated);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ep-text-muted);
}

.ep-table th,
.ep-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ep-border);
}

.ep-table tbody tr:last-child td {
  border-bottom: 0;
}

.ep-table tbody tr:hover td {
  background: var(--ep-brand-muted);
}

.ep-stat {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-card);
  padding: 1.25rem;
}

.ep-stat-icon {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--ep-brand-muted);
  color: var(--ep-brand);
}

.ep-stat-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ep-text-muted);
}

.ep-stat-value {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ep-text-primary);
}

.ep-grid {
  display: grid;
  gap: 1rem;
}

.ep-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ep-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ep-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {

  .ep-grid-4,
  .ep-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {

  .ep-grid-4,
  .ep-grid-3,
  .ep-grid-2 {
    grid-template-columns: 1fr;
  }
}

.ep-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.ep-toolbar .spacer {
  flex: 1;
}

/* Horizontal section tabs */
.ep-tabs {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
  margin: 0 0 1.25rem;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--ep-border);
  scrollbar-width: thin;
}

.ep-tabs-sub {
  margin-top: -0.5rem;
}

.ep-tab {
  flex: 0 0 auto;
  padding: 0.65rem 0.95rem;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ep-text-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.ep-tab:hover {
  color: var(--ep-text-primary);
}

.ep-tab:focus-visible {
  outline: 2px solid var(--ep-brand);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.ep-tab-active {
  color: var(--ep-brand);
  border-bottom-color: var(--ep-brand);
  font-weight: 600;
}

.ep-tab-active:hover {
  color: var(--ep-brand-hover);
}

.ep-person-header {
  margin-bottom: 1rem;
}

.ep-person-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.ep-person-meta {
  margin: 0.25rem 0 0;
  color: var(--ep-text-muted);
  font-size: 0.875rem;
}

.ep-dl-grid {
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  font-size: 0.875rem;
}

.ep-dl-grid dt {
  color: var(--ep-text-muted);
  font-size: 0.75rem;
}

.ep-dl-grid dd {
  margin: 0.25rem 0 0;
}

.ep-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.ep-form-grid label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  color: var(--ep-text-muted);
}

.ep-form-grid .ep-span-2 {
  grid-column: 1 / -1;
}

.ep-notif {
  position: relative;
}

.ep-notif-toggle {
  position: relative;
  border: 0;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--ep-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ep-notif-toggle:hover {
  background: var(--ep-surface-elevated);
  color: var(--ep-text-primary);
}

.ep-notif-badge {
  position: absolute;
  top: 0.15rem;
  right: 0.1rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--ep-brand, #007570);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  pointer-events: none;
}

.ep-notif-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 40;
  width: min(20rem, calc(100vw - 2rem));
  border: 1px solid var(--ep-border);
  border-radius: 0.75rem;
  background: var(--ep-surface-base);
  box-shadow: 0 10px 28px rgb(15 23 42 / 0.12);
  overflow: hidden;
}

.ep-notif-panel-head {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ep-text-muted);
  border-bottom: 1px solid var(--ep-border);
}

.ep-notif-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  max-height: 22rem;
  overflow-y: auto;
}

.ep-notif-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  color: inherit;
}

.ep-notif-item:hover {
  background: var(--ep-surface-elevated);
}

.ep-notif-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ep-text-primary);
}

.ep-notif-item-detail {
  font-size: 0.75rem;
  color: var(--ep-text-muted);
}

.ep-notif-empty {
  margin: 0;
  padding: 1.25rem 1rem;
  font-size: 0.875rem;
  color: var(--ep-text-muted);
  text-align: center;
}

.ep-theme-toggle {
  border: 0;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--ep-text-muted);
  cursor: pointer;
}

.ep-theme-toggle:hover {
  background: var(--ep-surface-elevated);
  color: var(--ep-text-primary);
}

.ep-theme-toggle-on-brand {
  border: 0;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: rgb(255 255 255 / 0.8);
  cursor: pointer;
}

.ep-theme-toggle-on-brand:hover {
  background: rgb(255 255 255 / 0.1);
  color: #fff;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-icon-moon {
  display: none;
}

.ep-menu-btn {
  border: 0;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--ep-text-muted);
  cursor: pointer;
}

.ep-menu-btn:hover {
  background: var(--ep-surface-elevated);
}

@media (min-width: 1024px) {
  .ep-menu-btn {
    display: none;
  }
}

/* Toasts */
#toast-container {
  position: fixed;
  right: 1.25rem;
  top: 1.25rem;
  z-index: 90;
  display: grid;
  gap: 0.75rem;
  width: min(22rem, calc(100vw - 2rem));
}

.ep-toast {
  border-radius: 0.75rem;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-card);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--ep-text-primary);
  box-shadow: 0 10px 30px rgb(16 33 29 / 0.12);
  transition: opacity 0.2s, transform 0.2s;
}

.ep-toast--success {
  border-color: color-mix(in srgb, var(--ep-success) 30%, var(--ep-border));
  background: var(--ep-success-muted);
}

.ep-toast--error {
  border-color: color-mix(in srgb, var(--ep-danger) 30%, var(--ep-border));
  background: var(--ep-danger-muted);
}

.ep-toast--info {
  border-color: color-mix(in srgb, var(--ep-brand) 30%, var(--ep-border));
  background: var(--ep-brand-muted);
}

.ep-toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

/* Login (EternalPeace split shell) */
.ep-login-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .ep-login-shell {
    flex-direction: row;
  }
}

.ep-login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.5rem 1.5rem 2.5rem;
  color: #fff;
  background: linear-gradient(145deg, #007570 0%, #044e46 55%, #082e2a 100%);
}

@media (min-width: 1024px) {
  .ep-login-brand {
    width: 45%;
    padding: 2.5rem 3rem;
  }
}

.ep-login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / 0.12) 1px, transparent 0);
  background-size: 24px 24px;
}

.ep-login-brand-top {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
}

.ep-login-brand-content {
  position: relative;
  z-index: 10;
  margin: 0 auto;
  display: flex;
  width: 100%;
  max-width: 28rem;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  animation: ep-login-fade-in 0.6s ease both;
}

@media (min-width: 1024px) {
  .ep-login-brand-content {
    padding-top: 0;
  }
}

.ep-login-logo {
  margin-bottom: 1.5rem;
  display: flex;
  height: 4.5rem;
  width: 4.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}

.ep-login-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-login-motto {
  margin: 1.25rem 0 0;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.9);
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  background: rgb(255 255 255 / 0.1);
}

.ep-login-brand-title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (min-width: 1024px) {
  .ep-login-brand-title {
    font-size: 2.25rem;
  }
}

.ep-login-brand-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(255 255 255 / 0.75);
}

.ep-login-brand-tagline {
  margin: 1rem 0 0;
  max-width: 24rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgb(255 255 255 / 0.8);
}

.ep-login-features {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: none;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.85);
}

@media (min-width: 1024px) {
  .ep-login-features {
    display: grid;
  }
}

.ep-login-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ep-login-features .num {
  display: flex;
  height: 1.5rem;
  width: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.15);
  font-size: 0.75rem;
}

.ep-login-form {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 0 1rem 2rem;
}

@media (min-width: 1024px) {
  .ep-login-form {
    padding: 2.5rem 2rem;
  }
}

.ep-login-card {
  margin-top: -1.5rem;
  width: 100%;
  max-width: 28rem;
  border-radius: 1.5rem 1.5rem 0 0;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-card);
  padding: 2rem;
  box-shadow: 0 20px 40px rgb(16 33 29 / 0.12);
  animation: ep-login-slide-up 0.55s ease 0.1s both;
}

@media (min-width: 1024px) {
  .ep-login-card {
    margin-top: 0;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
}

.ep-login-heading {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ep-text-primary);
}

.ep-login-lead {
  margin: 0.25rem 0 1.5rem;
  font-size: 0.875rem;
  color: var(--ep-text-muted);
}

.ep-login-footer {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ep-text-muted);
}

.ep-alert-error {
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--ep-danger) 30%, transparent);
  background: var(--ep-danger-muted);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--ep-danger);
}

[data-theme="dark"] .ep-login-brand {
  background: linear-gradient(145deg, #082e2a 0%, #044e46 50%, #0b1312 100%);
}

[data-theme="dark"] .ep-login-brand::before {
  background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / 0.06) 1px, transparent 0);
}

@keyframes ep-login-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Clock Component */
.ep-clock {
  text-align: center;
  padding: 1.5rem;
}

.ep-clock-time {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ep-brand);
  margin: 0;
  line-height: 1.2;
}

.ep-clock-date {
  font-size: 1rem;
  color: var(--ep-text-muted);
  margin: 0.5rem 0 0;
  font-weight: 500;
}

.ep-clock-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.ep-clock-actions form {
  margin: 0;
}

@media (max-width: 640px) {
  .ep-clock-time {
    font-size: 2rem;
  }
  .ep-clock-date {
    font-size: 0.875rem;
  }
}

/* Notice Carousel */
.ep-notice-carousel {
  position: relative;
  margin-top: 0.75rem;
}

.ep-notice-slides {
  position: relative;
  min-height: 100px;
}

.ep-notice-slide {
  display: none;
  padding: 1rem;
  background: var(--ep-surface-elevated);
  border-radius: 0.5rem;
  transition: opacity 0.3s ease;
}

.ep-notice-slide.is-active {
  display: block;
  animation: ep-fade-in 0.3s ease;
}

@keyframes ep-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ep-notice-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}


@keyframes ep-login-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {

  .ep-login-brand-content,
  .ep-login-card {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Modal */
.ep-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--ep-overlay);
}

.ep-modal-backdrop.is-open {
  display: flex;
}

.ep-modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-card);
  box-shadow: 0 20px 40px rgb(16 33 29 / 0.2);
}

.ep-modal-wide {
  width: min(720px, 100%);
}

.ep-modal-confirm {
  width: min(420px, 100%);
}

.ep-modal-confirm .body p {
  margin: 0;
  color: var(--ep-text-muted, var(--ep-text));
  line-height: 1.45;
}

.ep-modal-confirm footer {
  gap: 0.5rem;
}

.ep-modal-preview {
  width: min(1400px, calc(100vw - 1.5rem));
  height: calc(100vh - 1.5rem);
  max-height: calc(100vh - 1.5rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ep-doc-preview-body {
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  background: var(--ep-surface-elevated);
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.ep-doc-preview-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.ep-doc-preview-pdf {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: auto;
  padding: 1rem;
  background: #525659;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.ep-doc-preview-embed {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 70vh;
  border: 0;
  background: #fff;
}

.ep-doc-preview-pdf:has(.ep-doc-preview-embed) {
  padding: 0;
  background: #fff;
}

.ep-doc-preview-pdf canvas {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.ep-doc-preview-pdf[hidden],
.ep-doc-preview-image[hidden],
.ep-doc-preview-body .ep-empty[hidden] {
  display: none !important;
}

.ep-doc-preview-image {
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  object-fit: contain;
}

.ep-doc-preview-body .ep-empty {
  padding: 1.5rem;
  text-align: center;
}

.ep-doc-preview-body .ep-empty a {
  display: inline-block;
  margin-top: 0.75rem;
}

.ep-modal header,
.ep-modal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--ep-border);
}

.ep-modal footer {
  border-bottom: 0;
  border-top: 1px solid var(--ep-border);
  justify-content: flex-end;
}

.ep-modal .body {
  padding: 1.1rem;
}

.ep-attention {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ep-border);
  border-radius: 0.75rem;
}

.ep-attention-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  color: var(--ep-text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--ep-border);
}

.ep-attention li:last-child .ep-attention-row {
  border-bottom: 0;
}

.ep-attention-row:hover {
  background: var(--ep-surface-elevated);
  color: var(--ep-text-primary);
  text-decoration: none;
}

.ep-attention-count {
  min-width: 1.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ep-text-muted);
}

.ep-attention-count.is-hot {
  color: var(--ep-warning);
}

.ep-attention-count.is-alert {
  color: var(--ep-danger);
}

.ep-attention-label {
  flex: 1;
  font-size: 0.9rem;
}

.ep-attention-go {
  color: var(--ep-text-muted);
}

.ep-card-kicker {
  margin: 1.15rem 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ep-text-muted);
}

.ep-people {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ep-people li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--ep-border);
  font-size: 0.875rem;
}

.ep-people li:last-child {
  border-bottom: 0;
}

.ep-people-name {
  font-weight: 600;
}

.ep-people-meta {
  color: var(--ep-text-muted);
}

/* Roles & permissions picker */
.ep-modal-perms {
  width: min(880px, 100%);
}

.ep-perm-hint {
  margin: 0 0 1rem;
  color: var(--ep-text-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.ep-role-edit-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.ep-role-name {
  font-weight: 600;
}

.ep-perm-picker {
  display: grid;
  gap: 1.25rem;
}

.ep-perm-group-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.ep-perm-group-head h3 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ep-text-muted);
}

.ep-perm-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--ep-surface-elevated);
  color: var(--ep-text-muted);
}

.ep-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem;
}

.ep-perm-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--ep-border);
  border-radius: 0.625rem;
  background: var(--ep-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ep-perm-item:hover {
  border-color: var(--ep-brand);
  background: var(--ep-surface-card);
}

.ep-perm-item:has(input:checked) {
  border-color: var(--ep-brand);
  background: var(--ep-brand-muted);
}

.ep-perm-item.is-wildcard {
  grid-column: 1 / -1;
  background: var(--ep-surface-elevated);
}

.ep-perm-item input {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--ep-brand);
}

.ep-perm-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ep-perm-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ep-text-primary);
  line-height: 1.3;
}

.ep-perm-desc {
  font-size: 0.75rem;
  color: var(--ep-text-muted);
  line-height: 1.4;
}

.ep-perm-slug {
  font-size: 0.6875rem;
  color: var(--ep-text-muted);
  opacity: 0.85;
}

.ep-perm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 36rem;
}

.ep-perm-chips .ep-badge {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .ep-perm-grid {
    grid-template-columns: 1fr;
  }

  .ep-perm-item.is-wildcard {
    grid-column: auto;
  }
}

/* —— Public careers job board —— */
.ep-jobs-board .ep-jobs-board-panel {
  max-width: 42rem;
  width: 100%;
}

.ep-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.ep-job-card {
  border: 1px solid var(--ep-border);
  border-radius: 0.75rem;
  background: var(--ep-surface-card);
  padding: 1rem 1.125rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ep-job-card:hover,
.ep-job-card.is-open {
  border-color: var(--ep-brand);
  box-shadow: 0 8px 24px rgb(16 33 29 / 0.08);
}

[data-theme="dark"] .ep-job-card:hover,
[data-theme="dark"] .ep-job-card.is-open {
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
}

.ep-job-card-main {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.ep-job-logo {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-elevated);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ep-job-logo img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

.ep-job-body {
  flex: 1;
  min-width: 0;
}

.ep-job-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ep-text-primary);
}

.ep-job-meta,
.ep-job-salary {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ep-text-muted);
}

.ep-job-summary {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ep-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ep-job-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.65rem;
}

.ep-job-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-elevated);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ep-text-muted);
}

.ep-job-footer {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
}

.ep-job-apply {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ep-success);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.ep-job-apply:hover {
  color: var(--ep-brand-hover);
}

.ep-job-apply[aria-expanded="true"] {
  color: var(--ep-brand);
}

.ep-job-apply-icon {
  flex-shrink: 0;
}

.ep-job-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ep-border);
}

.ep-job-form[hidden] {
  display: none !important;
}

.ep-job-form-hint {
  font-size: 0.75rem;
  color: var(--ep-text-muted);
  margin: 0 0 0.75rem;
}

.ep-job-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Pill “Add files” upload control */
.ep-file-add {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.ep-file-add-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ep-file-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.55rem 1.35rem;
  border: 1.5px solid var(--ep-brand);
  border-radius: 999px;
  background: var(--ep-surface-card);
  color: var(--ep-brand);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ep-file-add:hover .ep-file-add-btn {
  background: var(--ep-brand-muted);
}

.ep-file-add-input:focus-visible + .ep-file-add-btn {
  outline: 2px solid var(--ep-brand);
  outline-offset: 2px;
}

.ep-file-add.has-file .ep-file-add-btn {
  border-color: var(--ep-brand-hover);
  color: var(--ep-brand-hover);
}

.ep-file-add-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  display: block;
}

.ep-file-add-name {
  max-width: 100%;
  font-size: 0.75rem;
  color: var(--ep-text-muted);
  word-break: break-all;
}

.ep-file-add-name[hidden] {
  display: none !important;
}

.ep-jobs-signin {
  margin-top: 1rem;
  font-size: 0.875rem;
  text-align: center;
}

@media (max-width: 480px) {
  .ep-job-card {
    padding: 0.875rem;
  }

  .ep-job-logo {
    width: 2.25rem;
    height: 2.25rem;
  }

  .ep-job-logo img {
    width: 1.4rem;
    height: 1.4rem;
  }
}


/* The hidden attribute must win over component display rules. */
[hidden] { display: none !important; }

.ep-print-company {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ep-brand, #007570);
}

@media print {
  .ep-sidebar,
  .ep-header,
  .ep-mobile-overlay,
  .ep-no-print,
  #toast-container,
  #ep-flash {
    display: none !important;
  }

  .ep-shell,
  .ep-main {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
  }

  .ep-print-sheet {
    border: 0;
    box-shadow: none;
  }
}

/* Phones: keep the leave inbox readable without a wide table. */
@media (max-width: 640px) {
  .ep-col-optional {
    display: none;
  }

  .ep-nowrap {
    white-space: nowrap;
  }
}
