.ep-web-mirror-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(37 99 235);
}

.ep-web-mirror-nav-icon svg { width: 100%; height: 100%; }
.dark .ep-web-mirror-nav-icon { color: rgb(147 197 253); }

.epwm-host > :not(#ep-web-mirror-root) { display: none !important; }
.epwm-host.epwm-modal-host { z-index: 100; }

.epwm-root {
  --epwm-text: #111827;
  --epwm-muted: #6b7280;
  --epwm-faint: #9ca3af;
  --epwm-line: #e5e7eb;
  --epwm-line-soft: #f1f5f9;
  --epwm-surface: #fff;
  --epwm-surface-soft: #f8fafc;
  --epwm-blue: #2563eb;
  --epwm-blue-soft: #eff6ff;
  --epwm-green: #047857;
  --epwm-green-soft: #ecfdf5;
  --epwm-amber: #b45309;
  --epwm-amber-soft: #fffbeb;
  color: var(--epwm-text);
  font: inherit;
}

.dark .epwm-root {
  --epwm-text: #f8fafc;
  --epwm-muted: #9ca3af;
  --epwm-faint: #64748b;
  --epwm-line: #334155;
  --epwm-line-soft: #1e293b;
  --epwm-surface: #111827;
  --epwm-surface-soft: #172033;
  --epwm-blue: #93c5fd;
  --epwm-blue-soft: rgba(30, 64, 175, .2);
  --epwm-green: #6ee7b7;
  --epwm-green-soft: rgba(6, 95, 70, .22);
  --epwm-amber: #fcd34d;
  --epwm-amber-soft: rgba(120, 53, 15, .22);
}

.epwm-root *, .epwm-root *::before, .epwm-root *::after { box-sizing: border-box; }
.epwm-root button, .epwm-root input, .epwm-root textarea { font: inherit; }
.epwm-root svg { display: block; width: 1rem; height: 1rem; }

.epwm-page {
  width: min(100%, 80rem);
  margin: 0 auto;
  animation: epwm-enter .22s ease-out both;
}

@keyframes epwm-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.epwm-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--epwm-line);
}

.epwm-heading { display: flex; align-items: flex-start; gap: 1rem; min-width: 0; }
.epwm-logo {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #bfdbfe;
  border-radius: .7rem;
  color: #2563eb;
  background: #eff6ff;
}
.dark .epwm-logo { color: #93c5fd; border-color: #1e40af; background: rgba(30, 64, 175, .22); }
.epwm-logo svg { width: 1.35rem; height: 1.35rem; }
.epwm-heading h1 { margin: 0; font-size: 1.5rem; line-height: 1.35; font-weight: 650; letter-spacing: -.02em; }
.epwm-heading p { margin: .28rem 0 0; color: var(--epwm-muted); font-size: .875rem; line-height: 1.55; }
.epwm-heading strong { display: block; margin-top: .45rem; color: var(--epwm-amber); font-size: .75rem; line-height: 1.45; font-weight: 600; }

.epwm-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
.epwm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.5rem;
  padding: .55rem .85rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  font-size: .875rem;
  line-height: 1;
  font-weight: 550;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.epwm-button:hover:not(:disabled) { box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.epwm-button:focus-visible, .epwm-icon-button:focus-visible, .epwm-tabs button:focus-visible, .epwm-switch:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
.epwm-button:disabled { cursor: not-allowed; opacity: .55; }
.epwm-button-secondary { color: var(--epwm-text); border-color: var(--epwm-line); background: var(--epwm-surface); }
.epwm-button-secondary:hover:not(:disabled) { background: var(--epwm-surface-soft); }
.epwm-button-primary { color: #fff; border-color: #2563eb; background: #2563eb; }
.epwm-button-primary:hover:not(:disabled) { background: #1d4ed8; }
.dark .epwm-button-primary { color: #07111f; border-color: #93c5fd; background: #93c5fd; }
.dark .epwm-button-primary:hover:not(:disabled) { background: #bfdbfe; }
.epwm-button-block { width: 100%; }

.epwm-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.5rem;
  margin-right: .15rem;
  padding-right: .85rem;
  border-right: 1px solid var(--epwm-line);
  color: var(--epwm-muted);
  font-size: .75rem;
  font-weight: 550;
}
.epwm-switch { position: relative; width: 2.5rem; height: 1.45rem; padding: 0; border: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: background .18s ease; }
.dark .epwm-switch { background: #475569; }
.epwm-switch.is-on { background: #10b981; }
.epwm-switch i { position: absolute; top: .15rem; left: .15rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .28); transition: transform .18s ease; }
.epwm-switch.is-on i { transform: translateX(1.05rem); }

.epwm-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.35rem;
  padding: 0 0 1.35rem;
  border-bottom: 1px solid var(--epwm-line);
}
.epwm-summary div { min-width: 0; }
.epwm-summary span { display: block; color: var(--epwm-muted); font-size: .75rem; }
.epwm-summary strong { display: block; margin-top: .28rem; font-size: .9rem; font-weight: 650; }
.epwm-summary .epwm-positive { color: var(--epwm-green); }

.epwm-tabs { display: flex; width: 100%; gap: .2rem; margin: .3rem 0 1.15rem; overflow-x: auto; border-bottom: 1px solid var(--epwm-line); scrollbar-width: thin; }
.epwm-tabs button { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; gap: .45rem; height: 2.8rem; padding: 0 .75rem; border: 0; color: var(--epwm-muted); background: transparent; font-size: .875rem; font-weight: 550; cursor: pointer; }
.epwm-tabs button:hover, .epwm-tabs button.is-active { color: var(--epwm-blue); }
.epwm-tabs button.is-active::after { content: ''; position: absolute; right: .5rem; bottom: 0; left: .5rem; height: 2px; background: currentColor; }
.epwm-tabs b { display: inline-grid; min-width: 1.25rem; height: 1.25rem; place-items: center; padding: 0 .35rem; border-radius: 999px; color: var(--epwm-muted); background: var(--epwm-line-soft); font-size: .68rem; line-height: 1; font-weight: 650; }

.epwm-panel { overflow: hidden; border: 1px solid var(--epwm-line); border-radius: .7rem; background: var(--epwm-surface); }
.epwm-plan { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 0; }
.epwm-plan-copy { padding: 1.45rem; }
.epwm-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.epwm-title-row h2, .epwm-submissions h2 { margin: 0; font-size: 1rem; line-height: 1.4; font-weight: 650; }
.epwm-plan-copy > p { margin: .55rem 0 0; color: var(--epwm-muted); font-size: .875rem; line-height: 1.6; }
.epwm-badge { display: inline-flex; align-items: center; min-height: 1.45rem; padding: .2rem .5rem; border: 1px solid; border-radius: 999px; font-size: .7rem; font-weight: 650; }
.epwm-badge-green { color: var(--epwm-green); border-color: #a7f3d0; background: var(--epwm-green-soft); }
.dark .epwm-badge-green { border-color: #065f46; }
.epwm-feature-block { margin-top: 1.25rem; }
.epwm-eyebrow { color: var(--epwm-muted); font-size: .72rem; font-weight: 550; }
.epwm-features { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.epwm-feature { display: inline-flex; align-items: center; gap: .35rem; min-height: 1.85rem; padding: .3rem .58rem; border: 1px solid var(--epwm-line); border-radius: .45rem; color: #374151; background: var(--epwm-surface-soft); font-size: .72rem; }
.dark .epwm-feature { color: #d1d5db; }
.epwm-feature i { display: inline-flex; color: var(--epwm-green); }
.epwm-feature svg { width: .78rem; height: .78rem; }

.epwm-plan-action { padding: 1.45rem; border-left: 1px solid var(--epwm-line-soft); }
.epwm-price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.epwm-price { min-width: 0; padding: .78rem; border: 1px solid; border-radius: .6rem; }
.epwm-price span, .epwm-price small { display: block; font-size: .68rem; }
.epwm-price span { font-weight: 650; }
.epwm-price strong { display: block; margin-top: .2rem; color: var(--epwm-text); font-size: 1.15rem; font-weight: 700; }
.epwm-price small { margin-top: .05rem; color: var(--epwm-muted); line-height: 1.35; }
.epwm-price-blue { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.epwm-price-green { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.dark .epwm-price-blue { color: #93c5fd; border-color: #1e40af; background: rgba(30, 64, 175, .18); }
.dark .epwm-price-green { color: #6ee7b7; border-color: #065f46; background: rgba(6, 95, 70, .18); }
.epwm-capacity { margin: .9rem 0; padding: .72rem .8rem; border: 1px dashed var(--epwm-line); border-radius: .55rem; }
.epwm-capacity div { display: flex; align-items: center; gap: .45rem; color: var(--epwm-amber); }
.epwm-capacity strong { font-size: .82rem; font-weight: 650; }
.epwm-capacity p { margin: .32rem 0 0; color: var(--epwm-muted); font-size: .72rem; line-height: 1.55; }

.epwm-empty { display: grid; min-height: 17rem; place-items: center; align-content: center; padding: 2rem; border: 1px dashed var(--epwm-line); border-radius: .7rem; text-align: center; }
.epwm-empty-icon { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: .6rem; color: var(--epwm-muted); background: var(--epwm-line-soft); }
.epwm-empty-icon svg { width: 1.2rem; height: 1.2rem; }
.epwm-empty h2, .epwm-empty h3 { margin: .75rem 0 0; font-size: .9rem; font-weight: 650; }
.epwm-empty p { width: min(100%, 28rem); margin: .3rem 0 0; color: var(--epwm-muted); font-size: .82rem; line-height: 1.6; }
.epwm-empty .epwm-button { margin-top: 1rem; }
.epwm-empty-compact { min-height: 14rem; }

.epwm-submissions > header { margin-bottom: 1rem; }
.epwm-submissions > header p { margin: .3rem 0 0; color: var(--epwm-muted); font-size: .82rem; line-height: 1.55; }
.epwm-submission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.epwm-submission { padding: 1rem; border: 1px solid var(--epwm-line); border-radius: .65rem; background: var(--epwm-surface); }
.epwm-submission-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.epwm-submission-head > div { min-width: 0; }
.epwm-submission-head strong, .epwm-submission-head span { display: block; }
.epwm-submission-head strong { overflow: hidden; font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.epwm-submission-head div span { margin-top: .18rem; overflow: hidden; color: var(--epwm-muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.epwm-status { flex: 0 0 auto; padding: .22rem .48rem; border-radius: 999px; font-size: .68rem; font-weight: 650; }
.epwm-status-pending { color: #b45309; background: #fffbeb; }
.epwm-status-approved, .epwm-status-available { color: #047857; background: #ecfdf5; }
.epwm-status-rejected { color: #b91c1c; background: #fef2f2; }
.dark .epwm-status-pending { color: #fcd34d; background: rgba(120, 53, 15, .25); }
.dark .epwm-status-approved, .dark .epwm-status-available { color: #6ee7b7; background: rgba(6, 95, 70, .25); }
.dark .epwm-status-rejected { color: #fca5a5; background: rgba(127, 29, 29, .25); }
.epwm-submission dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0 0; }
.epwm-submission dt { color: var(--epwm-faint); font-size: .68rem; }
.epwm-submission dd { margin: .2rem 0 0; overflow: hidden; color: var(--epwm-text); font-size: .72rem; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.epwm-notes { display: -webkit-box; margin: .75rem 0 0; overflow: hidden; color: var(--epwm-muted); font-size: .72rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.epwm-submission time { display: block; margin-top: .72rem; color: var(--epwm-faint); font-size: .65rem; }

.epwm-loading { display: grid; min-height: 22rem; place-items: center; }
.epwm-loading span { width: 2rem; height: 2rem; border: 2px solid #bfdbfe; border-top-color: #2563eb; border-radius: 50%; animation: epwm-spin .7s linear infinite; }
@keyframes epwm-spin { to { transform: rotate(360deg); } }

.epwm-backdrop { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 1rem; overflow-y: auto; overscroll-behavior: contain; background: rgba(2, 6, 23, .56); backdrop-filter: blur(2px); }
.epwm-modal { width: min(100%, 32rem); max-height: min(90vh, 52rem); overflow: auto; border: 1px solid var(--epwm-line); border-radius: .75rem; color: var(--epwm-text); background: var(--epwm-surface); box-shadow: 0 24px 60px rgba(2, 6, 23, .28); }
.epwm-modal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--epwm-line-soft); }
.epwm-modal h2 { margin: 0; font-size: 1.05rem; font-weight: 650; }
.epwm-modal header p { margin: .28rem 0 0; color: var(--epwm-muted); font-size: .8rem; line-height: 1.55; }
.epwm-modal > footer { display: flex; justify-content: flex-end; gap: .55rem; padding: .9rem 1.25rem; border-top: 1px solid var(--epwm-line-soft); }
.epwm-icon-button { display: grid; flex: 0 0 auto; width: 2rem; height: 2rem; place-items: center; padding: 0; border: 1px solid transparent; border-radius: .45rem; color: var(--epwm-muted); background: transparent; cursor: pointer; }
.epwm-icon-button:hover { color: var(--epwm-text); background: var(--epwm-surface-soft); }
.epwm-guide ol { display: grid; gap: 1rem; margin: 0; padding: 1.2rem 1.25rem; list-style: none; }
.epwm-guide li { display: flex; align-items: flex-start; gap: .75rem; }
.epwm-guide li > span { display: grid; flex: 0 0 auto; width: 1.75rem; height: 1.75rem; place-items: center; border-radius: 50%; color: #1d4ed8; background: #eff6ff; font-size: .72rem; font-weight: 700; }
.dark .epwm-guide li > span { color: #93c5fd; background: rgba(30, 64, 175, .22); }
.epwm-guide h3 { margin: .05rem 0 0; font-size: .83rem; font-weight: 650; }
.epwm-guide li p { margin: .25rem 0 0; color: var(--epwm-muted); font-size: .8rem; line-height: 1.55; }

.epwm-upload { width: min(100%, 42rem); max-height: 92vh; }
.epwm-form-body { display: grid; gap: 1rem; padding: 1.15rem 1.25rem; }
.epwm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.epwm-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.epwm-form-body label { display: block; min-width: 0; }
.epwm-form-body label > span, .epwm-form-body legend { display: block; margin-bottom: .36rem; color: #374151; font-size: .74rem; font-weight: 600; }
.dark .epwm-form-body label > span, .dark .epwm-form-body legend { color: #d1d5db; }
.epwm-form-body input, .epwm-form-body textarea { width: 100%; border: 1px solid var(--epwm-line); border-radius: .5rem; color: var(--epwm-text); background: var(--epwm-surface); font-size: .84rem; outline: none; transition: border .16s ease, box-shadow .16s ease; }
.epwm-form-body input { height: 2.55rem; padding: 0 .75rem; }
.epwm-form-body textarea { min-height: 5.5rem; padding: .65rem .75rem; resize: vertical; line-height: 1.5; }
.epwm-form-body input:focus, .epwm-form-body textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .15); }
.epwm-form-body input:disabled { color: var(--epwm-muted); background: var(--epwm-surface-soft); }
.epwm-form-body fieldset { margin: 0; padding: .85rem; border: 1px solid var(--epwm-line); border-radius: .6rem; }
.epwm-form-body legend { width: auto; margin: 0; padding: 0 .3rem; }
.epwm-security { display: flex; align-items: flex-start; gap: .55rem; padding: .65rem .75rem; border: 1px solid #fde68a; border-radius: .55rem; color: #92400e; background: #fffbeb; font-size: .72rem; line-height: 1.55; }
.epwm-security svg { flex: 0 0 auto; margin-top: .08rem; }
.dark .epwm-security { color: #fde68a; border-color: #78350f; background: rgba(120, 53, 15, .2); }

.epwm-toast { position: fixed; z-index: 110; right: 1.2rem; bottom: 1.2rem; max-width: min(24rem, calc(100vw - 2rem)); padding: .72rem .9rem; border: 1px solid #a7f3d0; border-radius: .55rem; color: #065f46; background: #ecfdf5; box-shadow: 0 10px 30px rgba(2, 6, 23, .18); font-size: .8rem; }
.epwm-toast.is-error { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.dark .epwm-toast { color: #a7f3d0; border-color: #065f46; background: #052e2b; }
.dark .epwm-toast.is-error { color: #fecaca; border-color: #7f1d1d; background: #450a0a; }

@media (max-width: 1023px) {
  .epwm-page-header { flex-direction: column; gap: 1.1rem; }
  .epwm-actions { justify-content: flex-start; }
  .epwm-plan { grid-template-columns: 1fr; }
  .epwm-plan-action { border-top: 1px solid var(--epwm-line-soft); border-left: 0; }
}

@media (max-width: 767px) {
  .epwm-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .epwm-submission-grid { grid-template-columns: 1fr; }
  .epwm-form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .epwm-page-header { padding-bottom: 1.1rem; }
  .epwm-heading { gap: .75rem; }
  .epwm-logo { width: 2.45rem; height: 2.45rem; }
  .epwm-heading h1 { font-size: 1.3rem; }
  .epwm-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .epwm-actions .epwm-button { width: 100%; padding-inline: .55rem; }
  .epwm-switch-wrap { grid-column: 1 / -1; justify-content: space-between; margin: 0; padding: 0 0 .6rem; border-right: 0; border-bottom: 1px solid var(--epwm-line); }
  .epwm-plan-copy, .epwm-plan-action { padding: 1rem; }
  .epwm-price-grid { grid-template-columns: 1fr; }
  .epwm-form-grid, .epwm-form-grid-3 { grid-template-columns: 1fr; }
  .epwm-upload { max-height: calc(100vh - 1rem); }
  .epwm-modal > header, .epwm-form-body, .epwm-guide ol, .epwm-modal > footer { padding-right: 1rem; padding-left: 1rem; }
  .epwm-submission dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .epwm-page, .epwm-loading span { animation: none; }
  .epwm-root *, .epwm-root *::before, .epwm-root *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
