:root{--epem-red:#b21917;--epem-red-dark:#86110f;--epem-ink:#111827;--epem-muted:#6b7280;--epem-border:#e5e7eb;--epem-soft:#f8fafc;--epem-card:#ffffff;--epem-shadow:0 24px 80px rgba(17,24,39,.14)}
.epem-portal{display:flex;gap:24px;max-width:1200px;margin:32px auto;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--epem-ink)}
.epem-sidebar{width:240px;background:#111827;color:#fff;padding:20px;border-radius:18px;box-shadow:0 18px 40px rgba(17,24,39,.18)}
.epem-sidebar a{display:block;color:#fff;text-decoration:none;padding:9px 0;opacity:.92}.epem-sidebar a:hover{opacity:1;text-decoration:underline}
.epem-main{flex:1;background:#fff;padding:24px;border:1px solid var(--epem-border);border-radius:18px;box-shadow:0 12px 40px rgba(15,23,42,.05)}
.epem-public-screen{display:block;max-width:1060px;margin:58px auto 72px}.epem-public-screen .epem-main{padding:0;border:0;background:transparent;box-shadow:none}
.epem-button,
.epem-form button[type="submit"]:not([class]){display:inline-flex;align-items:center;justify-content:center;gap:6px;background:#b21917!important;color:#fff!important;border:0!important;border-radius:10px;padding:10px 16px;min-height:40px;text-decoration:none;cursor:pointer;font-weight:700;font-size:.9rem;line-height:1.2;white-space:nowrap;box-sizing:border-box;transition:none!important;vertical-align:middle;text-shadow:none!important;box-shadow:none!important}.epem-button:hover,
.epem-form button[type="submit"]:not([class]):hover{background:#86110f!important;color:#fff!important;text-decoration:none!important;text-shadow:none!important;box-shadow:none!important;transform:none!important;outline:none!important}.epem-button:disabled,.epem-button[disabled]{opacity:.55;cursor:not-allowed;pointer-events:none}
input,select,textarea{max-width:100%;padding:10px 12px;border:1px solid #d1d5db;border-radius:10px;background:#fff;color:#111827}input:focus,select:focus,textarea:focus{outline:2px solid rgba(178,25,23,.18);border-color:var(--epem-red)}
table{width:100%;border-collapse:collapse}td,th{border-bottom:1px solid var(--epem-border);padding:9px;text-align:left}.epem-notice{border-radius:12px;padding:12px 14px;margin-bottom:16px;background:#eff6ff;border:1px solid #bfdbfe}.epem-error{background:#fef2f2;border-color:#fecaca;color:#991b1b}.epem-success{background:#f0fdf4;border-color:#bbf7d0;color:#166534}
.epem-auth-shell{display:grid;grid-template-columns:minmax(320px,.92fr) minmax(360px,1.08fr);gap:0;min-height:590px;border-radius:28px;overflow:hidden;background:#fff;box-shadow:var(--epem-shadow);border:1px solid rgba(229,231,235,.9)}
.epem-auth-shell-single{display:flex;justify-content:center;min-height:0;background:linear-gradient(135deg,#fff 0%,#fff 48%,#fef2f2 100%);padding:34px}.epem-auth-shell-single .epem-auth-panel{max-width:560px;width:100%;border-radius:22px;box-shadow:0 14px 40px rgba(17,24,39,.08)}
.epem-auth-panel{padding:46px}.epem-auth-brand-panel{position:relative;display:flex;flex-direction:column;justify-content:space-between;background:radial-gradient(circle at 15% 15%,rgba(255,255,255,.24),transparent 28%),linear-gradient(145deg,var(--epem-red) 0%,#7f0d0b 100%);color:#fff;overflow:hidden}.epem-auth-brand-panel:after{content:"";position:absolute;right:-90px;bottom:-90px;width:260px;height:260px;border-radius:999px;background:rgba(255,255,255,.09)}
.epem-auth-logo-wrap{position:relative;z-index:1}.epem-auth-logo{display:block;max-width:220px;height:auto;background:transparent;border-radius:0;padding:0;box-shadow:none}.epem-auth-logo-wrap .custom-logo-link{display:inline-block;background:transparent;padding:0;border-radius:0}.epem-auth-logo-wrap img:not(.epem-auth-logo){max-width:150px;height:auto;display:block}.epem-auth-wordmark{display:inline-flex;align-items:center;justify-content:center;background:#fff;color:var(--epem-red);font-size:22px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;border-radius:14px;padding:12px 16px}.epem-auth-kicker{position:relative;z-index:1;text-transform:uppercase;letter-spacing:.18em;font-size:12px;font-weight:800;margin:52px 0 14px;opacity:.86}.epem-auth-brand-panel h1{position:relative;z-index:1;font-size:40px;line-height:1.02;margin:0;letter-spacing:-.04em;color:#fff}.epem-auth-feature-list{position:relative;z-index:1;display:grid;gap:11px;margin-top:42px}.epem-auth-feature-list span{display:flex;gap:10px;align-items:center;font-size:14px;opacity:.94}.epem-auth-feature-list span:before{content:"";width:8px;height:8px;border-radius:99px;background:#fff;box-shadow:0 0 0 5px rgba(255,255,255,.16)}
.epem-auth-form-panel{background:linear-gradient(180deg,#fff 0%,#fff 58%,#f8fafc 100%);display:flex;flex-direction:column;justify-content:center}.epem-auth-card-header{margin-bottom:24px}.epem-auth-eyebrow{color:var(--epem-red);font-weight:900;text-transform:uppercase;letter-spacing:.16em;font-size:12px;margin:0 0 8px}.epem-auth-card-header h2{font-size:34px;line-height:1.08;margin:0 0 10px;letter-spacing:-.035em;color:var(--epem-ink)}.epem-auth-card-header p{margin:0;color:var(--epem-muted);font-size:15px;line-height:1.55}.epem-auth-form{display:grid;gap:16px}.epem-auth-form label{display:grid;gap:7px;font-size:13px;font-weight:800;color:#374151}.epem-auth-form input[type="text"],.epem-auth-form input[type="email"],.epem-auth-form input[type="password"]{width:100%;box-sizing:border-box;min-height:48px;font-size:15px;border-radius:12px;border:1px solid #d1d5db;background:#fff}.epem-auth-row{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:13px}.epem-auth-row a,.epem-auth-footnote a{color:var(--epem-red);font-weight:800;text-decoration:none}.epem-auth-row a:hover,.epem-auth-footnote a:hover{text-decoration:underline}.epem-auth-check{display:flex!important;grid-template-columns:auto 1fr!important;gap:8px!important;align-items:center;font-weight:700!important}.epem-auth-check input{width:auto}.epem-auth-primary,.epem-auth-secondary{display:inline-flex;align-items:center;justify-content:center;min-height:48px;border-radius:12px;font-weight:900;text-decoration:none;border:0;width:100%;box-sizing:border-box}.epem-auth-primary{background:var(--epem-red);color:#fff;box-shadow:0 12px 24px rgba(178,25,23,.22)}.epem-auth-primary:hover{background:var(--epem-red-dark);color:#fff}.epem-auth-secondary{background:#fff;color:var(--epem-red);border:1px solid rgba(178,25,23,.25)}.epem-auth-secondary:hover{background:#fff5f5;color:var(--epem-red-dark)}.epem-auth-secondary-button{cursor:pointer}.epem-auth-button-link{width:auto;padding:0 22px}.epem-auth-divider{display:flex;align-items:center;gap:12px;margin:22px 0;color:#9ca3af;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.12em}.epem-auth-divider:before,.epem-auth-divider:after{content:"";height:1px;background:#e5e7eb;flex:1}.epem-auth-error,.epem-auth-message{border-radius:12px;padding:12px 14px;margin-bottom:16px;background:#fef2f2;border:1px solid #fecaca;color:#991b1b;font-weight:700;font-size:14px}.epem-auth-message{display:none;background:#f8fafc;border-color:#e5e7eb;color:#374151}.epem-auth-message:not(:empty){display:block}.epem-auth-footnote{margin:18px 0 0;text-align:center;color:var(--epem-muted);font-size:14px}
@media(max-width:900px){.epem-auth-shell{grid-template-columns:1fr}.epem-auth-brand-panel{padding:32px}.epem-auth-brand-panel h1{font-size:30px}.epem-auth-feature-list{margin-top:24px}.epem-auth-form-panel{padding:32px}.epem-public-screen{margin:28px 16px 52px}}
@media(max-width:800px){.epem-portal{display:block;margin:18px 12px}.epem-sidebar{width:auto;margin-bottom:16px}.epem-main{padding:18px}.epem-public-screen .epem-main{padding:0}.epem-auth-shell-single{padding:18px}.epem-auth-card-header h2{font-size:28px}}

/* Standalone app treatment for portal pages. */
body:has(.epem-portal) .site-header,
body:has(.epem-portal) header.header,
body:has(.epem-portal) .main-navigation,
body:has(.epem-portal) footer,
body:has(.epem-portal) .site-footer { display:none!important; }

.epem-protected-screen{max-width:1440px;margin:0 auto;gap:0;min-height:calc(100vh - 32px);border-radius:0}.epem-protected-screen .epem-main{border-radius:0;border:0;box-shadow:none;padding:32px 38px;background:#f8fafc}.epem-protected-screen .epem-sidebar{background:#C0392B;color:#fff;border-radius:0;box-shadow:none;padding:0;width:260px}.epem-sidebar-logo{padding:16px;text-align:center;border-bottom:1px solid rgba(255,255,255,.18)}.epem-sidebar-logo img{display:block;max-width:160px;height:auto;margin:0 auto}.epem-sidebar-nav{display:block;margin:0;padding:12px 0}.epem-sidebar-nav a,.epem-sidebar a{display:block;color:#fff!important;text-decoration:none;padding:10px 20px;opacity:1;border-radius:0;font-weight:700}.epem-sidebar-nav a:hover,.epem-sidebar a:hover{background:rgba(0,0,0,.15);text-decoration:none}.epem-sidebar-nav a.is-active{background:rgba(0,0,0,.25);color:#fff!important;font-weight:900}.epem-dashboard-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:24px}.epem-dashboard-header h1{margin:0 0 8px;font-size:34px;line-height:1.1}.epem-dashboard-header p{color:#4b5563}.epem-eyebrow{margin:0 0 8px;color:#C0392B!important;font-weight:900;text-transform:uppercase;letter-spacing:.12em;font-size:12px}.epem-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;margin:18px 0 28px}.epem-card{background:#fff;border:1px solid var(--epem-border);border-radius:16px;padding:18px;box-shadow:0 10px 28px rgba(15,23,42,.06)}.epem-card strong{display:block;color:#6b7280;text-transform:uppercase;letter-spacing:.08em;font-size:12px}.epem-card span{font-size:32px;font-weight:900;color:#111827}.epem-table{background:#fff;border:1px solid var(--epem-border);border-radius:14px;overflow:hidden}.epem-table th{background:#f3f4f6;color:#374151;font-size:12px;text-transform:uppercase;letter-spacing:.08em}
@media(max-width:800px){.epem-protected-screen{display:block}.epem-protected-screen .epem-sidebar{width:auto}.epem-dashboard-header{display:block}.epem-dashboard-header h1{font-size:28px}}


/* Portal page body class fallback, stronger than :has() and works with theme chrome rendered before shortcode. */
body.epem-portal-page .site-header,
body.epem-portal-page header.header,
body.epem-portal-page #masthead,
body.epem-portal-page .main-navigation,
body.epem-portal-page .nav-primary,
body.epem-portal-page footer,
body.epem-portal-page .site-footer,
body.epem-portal-page #colophon { display:none!important; }

body.epem-portal-page { background:#f8fafc!important; }
body.epem-portal-page .entry-header,
body.epem-portal-page .page-title,
body.epem-portal-page .entry-title { display:none!important; }
body.epem-portal-page .site-content,
body.epem-portal-page .content-area,
body.epem-portal-page .entry-content,
body.epem-portal-page main,
body.epem-portal-page article { max-width:none!important; width:100%!important; margin:0!important; padding:0!important; }
body.epem-portal-page .epem-portal.epem-protected-screen { max-width:none!important; width:100%!important; margin:0!important; min-height:100vh!important; }
body.epem-portal-page .epem-protected-screen .epem-sidebar { min-height:100vh!important; }
body.epem-portal-page .epem-protected-screen .epem-main { min-height:100vh!important; }

/* v1.0.14: hard standalone portal mode. The public theme may not expose predictable
   header/footer classes, so the portal JS hides body-level siblings and these styles
   make the remaining wrapper behave like an app shell. */
body.epem-portal-page,
body.epem-standalone-portal { background:#f4f6f8!important; overflow-x:hidden!important; }
body.epem-standalone-portal .epem-theme-hidden { display:none!important; }
body.epem-standalone-portal .epem-portal-host,
body.epem-standalone-portal .epem-portal-host *:not(.epem-sidebar):not(.epem-sidebar *) { box-sizing:border-box; }
body.epem-standalone-portal .epem-portal-host { max-width:none!important; width:100%!important; margin:0!important; padding:0!important; }
body.epem-standalone-portal .epem-portal.epem-protected-screen,
body.epem-portal-page .epem-portal.epem-protected-screen {
    display:grid!important;
    grid-template-columns:260px minmax(0,1fr)!important;
    gap:0!important;
    width:100%!important;
    max-width:none!important;
    min-height:100vh!important;
    margin:0!important;
    padding:0!important;
    background:#f4f6f8!important;
    align-items:stretch!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-sidebar,
body.epem-portal-page .epem-protected-screen .epem-sidebar {
    position:sticky!important;
    top:0!important;
    align-self:start!important;
    width:260px!important;
    min-height:100vh!important;
    background:#C0392B!important;
    border-radius:0!important;
    padding:0!important;
    margin:0!important;
    z-index:20!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-main,
body.epem-portal-page .epem-protected-screen .epem-main {
    min-width:0!important;
    width:100%!important;
    min-height:100vh!important;
    padding:42px 52px!important;
    margin:0!important;
    background:#f4f6f8!important;
    border:0!important;
    box-shadow:none!important;
    border-radius:0!important;
    overflow:auto!important;
}
body.epem-standalone-portal .epem-dashboard-header,
body.epem-portal-page .epem-dashboard-header { max-width:1180px; }
body.epem-standalone-portal .epem-dashboard-header .epem-button,
body.epem-portal-page .epem-dashboard-header .epem-button { white-space:normal; line-height:1.25; }
body.epem-standalone-portal .epem-table,
body.epem-portal-page .epem-table { max-width:1180px; }
@media(max-width:900px){
  body.epem-standalone-portal .epem-portal.epem-protected-screen,
  body.epem-portal-page .epem-portal.epem-protected-screen { display:block!important; }
  body.epem-standalone-portal .epem-protected-screen .epem-sidebar,
  body.epem-portal-page .epem-protected-screen .epem-sidebar { position:relative!important; width:100%!important; min-height:0!important; }
  body.epem-standalone-portal .epem-protected-screen .epem-main,
  body.epem-portal-page .epem-protected-screen .epem-main { padding:24px 18px!important; }
}


/* v1.0.15: stronger standalone reset for themes that wrap header/content/footer together. */
body.epem-standalone-portal .epem-theme-hidden { display:none!important; visibility:hidden!important; height:0!important; overflow:hidden!important; }
body.epem-standalone-portal .epem-portal-path { max-width:none!important; width:100%!important; margin:0!important; padding:0!important; }
body.epem-standalone-portal #page,
body.epem-standalone-portal .site,
body.epem-standalone-portal .site-inner,
body.epem-standalone-portal .site-content,
body.epem-standalone-portal .content,
body.epem-standalone-portal .content-sidebar-wrap,
body.epem-standalone-portal .wrap,
body.epem-standalone-portal .container { max-width:none!important; width:100%!important; margin:0!important; padding:0!important; }
body.epem-standalone-portal .epem-protected-screen .epem-main > * { max-width:1180px; }
body.epem-standalone-portal .epem-protected-screen .epem-main .epem-dashboard-header,
body.epem-standalone-portal .epem-protected-screen .epem-main .epem-cards,
body.epem-standalone-portal .epem-protected-screen .epem-main .epem-table { width:100%; }

/* v1.0.16: shell-first AJAX loading state. */
.epem-loading {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-height:600px;
    gap:16px;
    color:#6b7280;
}
.epem-loading-spinner {
    width:40px;
    height:40px;
    border:3px solid #e5e7eb;
    border-top-color:#C0392B;
    border-radius:50%;
    animation:epem-spin .7s linear infinite;
}
@keyframes epem-spin { to { transform:rotate(360deg); } }

/* Event detail screen */
.epem-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.epem-eyebrow {
    margin: 0 0 6px;
    color: #C0392B;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.epem-page-header h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 0.95;
}
.epem-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.epem-button-secondary { background: #111827; }
.epem-status-badge {
    display: inline-flex;
    margin-top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(192, 57, 43, 0.10);
    color: #C0392B;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.epem-event-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: start;
}
.epem-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
    overflow: hidden;
}
.epem-event-summary-card { padding: 0; }
.epem-event-image {
    display: block;
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    background: #f3f4f6;
}
.epem-event-description {
    padding: 24px;
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}
.epem-event-info-card { padding: 24px; }
.epem-event-info-card h2 {
    margin: 0 0 18px;
    font-size: 24px;
}
.epem-info-list {
    display: grid;
    gap: 14px;
    margin: 0;
}
.epem-info-list dt {
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.epem-info-list dd {
    margin: 0;
    color: #111827;
    font-size: 15px;
    font-weight: 600;
}
@media (max-width: 900px) {
    .epem-page-header { flex-direction: column; }
    .epem-page-actions { justify-content: flex-start; }
    .epem-event-detail-grid { grid-template-columns: 1fr; }
}

.epem-field-help {
    display: block !important;
    margin: 4px 0 12px !important;
    color: #6b7280 !important;
    font-size: 12px !important;
    font-weight: normal !important;
    line-height: 1.4 !important;
    font-style: italic !important;
}

.epem-place-status {
    margin-top: 8px;
    min-height: 18px;
    font-size: 13px;
    font-weight: 700;
}

.epem-place-status.is-success { color: #047857; }
.epem-place-status.is-warning { color: #92400e; }
.epem-place-status.is-error { color: #b91c1c; }

.epem-venue-fieldset input[data-epem-place-autocomplete] {
    width: min(100%, 520px);
}

/* v1.0.23 UI polish */
.epem-protected-screen .epem-main{
    width: calc(100vw - 260px);
    max-width: none;
    min-height: 100vh;
    overflow-x: hidden;
}
.epem-event-detail-wide,
.epem-ticket-list-screen,
.epem-checkin-screen{
    width: min(100%, 1500px);
}
.epem-event-detail-header{
    align-items: flex-start;
    margin-bottom: 32px;
}
/* Event detail title — high-specificity rule to override theme h1 */
body .epem-portal .epem-event-detail-header h1,
body.epem-standalone-portal .epem-event-detail-header h1,
body.epem-portal-page .epem-event-detail-header h1 {
    font-size: clamp(1.375rem, 2.5vw, 2rem) !important;
    line-height: 1.2 !important;
    letter-spacing: -.01em !important;
    margin: 0 0 10px !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 680px !important;
    text-transform: none !important;
}
.epem-event-detail-grid-wide{
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: 32px;
    width: 100%;
}
.epem-event-detail-wide .epem-event-image{
    max-height: 520px;
}
.epem-event-info-sticky{
    position: sticky;
    top: 24px;
}
.epem-event-actions .epem-button{
    min-width: 112px;
}
.epem-status-small{
    margin-top: 0;
    padding: 5px 8px;
    font-size: 11px;
}
.epem-status-ready{
    background: rgba(4,120,87,.12);
    color: #047857;
}
.epem-status-warning{
    background: rgba(180,83,9,.13);
    color: #b45309;
}
.epem-subtitle{
    margin: 8px 0 0;
    color: #4b5563;
    font-size: 15px;
    max-width: 760px;
}
.epem-table-card{
    padding: 0;
    overflow: hidden;
}
.epem-table-card .epem-table{
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
}
.epem-ticket-table td,
.epem-ticket-table th{
    vertical-align: middle;
}
.epem-row-actions{
    white-space: nowrap;
}
.epem-row-actions a,
.epem-row-actions .epem-link-button{
    margin-right: 10px;
}
.epem-checkin-hero{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 22px;
}
.epem-checkin-hero h1{
    margin: 0;
    font-size: clamp(34px, 5vw, 72px);
    line-height: .95;
    max-width: 1100px;
}
.epem-checkin-search-card{
    padding: 22px;
    max-width: 860px;
    margin-bottom: 22px;
}
.epem-checkin-label{
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    color: #111827;
}
.epem-checkin-input-row{
    display: flex;
    gap: 12px;
    align-items: center;
}
.epem-checkin-input-row input{
    flex: 1;
    min-height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 16px;
}
.epem-checkin-input-row .epem-button{
    min-height: 48px;
}
.epem-checkin-result-card{
    padding: 24px;
    max-width: 860px;
    border-left: 6px solid #047857;
}
.epem-checkin-result-card.is-checked-in{
    border-left-color: #b45309;
}
.epem-checkin-result-header{
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 22px;
}
.epem-checkin-result-header h2{
    margin: 0 0 4px;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1;
}
.epem-checkin-result-header p{
    margin: 0;
    color: #4b5563;
}
.epem-checkin-info-list{
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: start;
    margin-bottom: 22px;
}
.epem-checkin-submit{
    min-width: 190px;
}
.epem-checkin-event-table td:last-child,
.epem-checkin-event-table th:last-child{
    text-align: right;
}
@media (max-width: 1000px){
    .epem-protected-screen .epem-main{ width: 100%; }
    .epem-event-detail-grid-wide{ grid-template-columns: 1fr; }
    .epem-event-info-sticky{ position: static; }
    .epem-checkin-hero{ flex-direction: column; }
    .epem-checkin-input-row{ flex-direction: column; align-items: stretch; }
    .epem-checkin-info-list{ grid-template-columns: 1fr; }
}

/* Event detail dashboard summary */
.epem-event-dashboard-section{
    margin-top: 34px;
    padding-bottom: 60px;
}
.epem-section-header{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin: 0 0 22px;
}
.epem-section-header h2{
    margin: 0;
    font-size: clamp(32px, 4vw, 58px);
    line-height: .95;
}
.epem-empty-card{
    padding: 26px;
    max-width: 760px;
}
.epem-empty-card h3{
    margin: 0 0 8px;
    font-size: 26px;
}
.epem-ticket-summary-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.epem-ticket-card{
    padding: 22px;
}
.epem-ticket-card-header{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.epem-ticket-card-header h3{
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
}
.epem-status-badge.is-published{
    background: rgba(4, 120, 87, .12);
    color: #047857;
}
.epem-ticket-stat-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}
.epem-ticket-stat-grid div{
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
}
.epem-ticket-stat-grid dt{
    margin: 0 0 4px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.epem-ticket-stat-grid dd{
    margin: 0;
    color: #111827;
    font-size: 16px;
    font-weight: 800;
}
.epem-ticket-card-actions{
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}
.epem-ticket-card-actions a{
    color: #C0392B;
    font-weight: 900;
}
.epem-event-totals-card{
    padding: 24px;
}
.epem-event-totals-card h3{
    margin: 0 0 18px;
    font-size: 26px;
}
.epem-event-total-stats{
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.epem-alert-warning{
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    padding: 14px 16px;
    border-radius: 12px;
    margin: 16px 0;
}
@media (max-width: 900px){
    .epem-section-header{ flex-direction: column; }
    .epem-ticket-stat-grid{ grid-template-columns: 1fr; }
}

/* v1.0.28: redesigned event detail layout */
body.epem-standalone-portal .epem-protected-screen .epem-main > .epem-event-detail-wide,
body.epem-portal-page .epem-protected-screen .epem-main > .epem-event-detail-wide{
    max-width: none !important;
    width: min(100%, 1680px) !important;
}
.epem-event-hero{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:28px;
    align-items:start;
    margin-bottom:22px;
}
.epem-event-hero h1{
    max-width:1100px;
    margin:0;
    font-size:clamp(44px,5vw,84px);
    line-height:.9;
}
.epem-event-dashboard-top{
    margin:18px 0 32px;
    padding-bottom:0;
}
.epem-event-number-bar{
    display:grid;
    grid-template-columns:repeat(4,minmax(170px,1fr));
    gap:16px;
    margin-bottom:26px;
}
.epem-event-number-card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:20px 22px;
    box-shadow:0 18px 45px rgba(17,24,39,.07);
}
.epem-event-number-card span{
    display:block;
    margin-bottom:8px;
    color:#6b7280;
    font-size:11px;
    font-weight:900;
    letter-spacing:.1em;
    text-transform:uppercase;
}
.epem-event-number-card strong{
    display:block;
    color:#111827;
    font-size:clamp(28px,3vw,42px);
    line-height:1;
    font-weight:900;
}
.epem-ticket-summary-header{
    margin-top:4px;
}
.epem-ticket-summary-header h2{
    font-size:clamp(32px,4vw,58px);
}
.epem-ticket-summary-grid-dynamic{
    grid-template-columns:repeat(auto-fill,minmax(360px,1fr));
    align-items:stretch;
    gap:20px;
}
.epem-ticket-card-compact{
    padding:0;
    display:flex;
    flex-direction:column;
    min-width:0;
    overflow:hidden;
}
.epem-ticket-card-compact .epem-ticket-card-header{
    padding:20px 22px 14px;
    margin:0;
    border-bottom:1px solid #eef2f7;
}
.epem-ticket-card-compact .epem-ticket-card-header h3{
    font-size:20px;
    line-height:1.15;
    max-width:calc(100% - 94px);
    overflow-wrap:anywhere;
}
.epem-ticket-stat-grid-compact{
    padding:18px;
    gap:10px;
}
.epem-ticket-stat-grid-compact div{
    min-width:0;
    padding:13px 14px;
}
.epem-ticket-stat-grid-compact dd{
    overflow-wrap:anywhere;
}
.epem-ticket-card-compact .epem-ticket-card-actions{
    margin-top:auto;
    padding:16px 20px;
    border-top:1px solid #eef2f7;
    background:#fff;
}
.epem-event-overview-layout{
    display:grid;
    grid-template-columns:minmax(0,1.75fr) minmax(360px,.8fr);
    gap:32px;
    align-items:start;
    width:100%;
}
.epem-event-overview-layout .epem-event-summary-card{
    min-width:0;
}
.epem-event-overview-layout .epem-event-image{
    max-height:620px;
}
.epem-loading-compact{
    min-height:160px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    box-shadow:0 18px 45px rgba(17,24,39,.07);
}
@media (max-width:1200px){
    .epem-event-hero,
    .epem-event-overview-layout{grid-template-columns:1fr;}
    .epem-event-number-bar{grid-template-columns:repeat(2,minmax(0,1fr));}
    .epem-event-actions{justify-content:flex-start;}
}
@media (max-width:700px){
    .epem-event-number-bar{grid-template-columns:1fr;}
    .epem-ticket-summary-grid-dynamic{grid-template-columns:1fr;}
    .epem-ticket-stat-grid-compact{grid-template-columns:1fr;}
    .epem-event-hero h1{font-size:clamp(20px,5vw,32px)!important;line-height:1.2!important;word-break:break-word!important;}
}


/* v1.0.29: event detail width and ticket-card polish */
body.epem-standalone-portal .epem-protected-screen .epem-main,
body.epem-portal-page .epem-protected-screen .epem-main{
    padding-right:clamp(32px,4vw,72px)!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-main > *,
body.epem-portal-page .epem-protected-screen .epem-main > *{
    max-width:none!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-main > .epem-event-detail-wide,
body.epem-portal-page .epem-protected-screen .epem-main > .epem-event-detail-wide{
    width:100%!important;
    max-width:1840px!important;
    margin-left:0!important;
    margin-right:auto!important;
}
.epem-event-hero{
    grid-template-columns:minmax(0,1fr) minmax(360px,auto);
}
.epem-event-actions{
    justify-content:flex-end;
}
.epem-event-number-bar{
    grid-template-columns:repeat(4,minmax(220px,1fr));
    max-width:1400px;
}
.epem-ticket-summary-grid-dynamic{
    grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
    gap:24px;
    width:100%;
    max-width:1560px;
}
.epem-ticket-card-compact .epem-ticket-card-header{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    gap:12px;
}
.epem-ticket-card-compact .epem-ticket-card-header h3{
    max-width:none;
    font-size:18px;
    line-height:1.12;
}
.epem-ticket-card-compact .epem-status-badge{
    margin-top:0;
    padding:4px 8px;
    font-size:10px;
    letter-spacing:.08em;
    line-height:1.1;
    transform:none;
}
.epem-status-badge.is-published{
    background:rgba(4,120,87,.10);
    color:#047857;
}
.epem-ticket-stat-grid-compact{
    grid-template-columns:repeat(2,minmax(0,1fr));
}
.epem-ticket-stat-grid-compact div{
    border-radius:10px;
}
@media (min-width:1700px){
    .epem-ticket-summary-grid-dynamic{grid-template-columns:repeat(4,minmax(280px,1fr));}
}
@media (max-width:1200px){
    .epem-event-number-bar{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:700px){
    .epem-event-number-bar{grid-template-columns:1fr;}
    .epem-ticket-summary-grid-dynamic{grid-template-columns:1fr;}
}


/* v1.0.31: event detail full-width rules must only affect protected app screens, not public login screens */
body.epem-standalone-portal .epem-portal.epem-protected-screen,
body.epem-portal-page .epem-portal.epem-protected-screen,
body.epem-standalone-portal .epem-protected-screen,
body.epem-portal-page .epem-protected-screen{
    width:100vw!important;
    max-width:none!important;
    margin:0!important;
}
/* Keep the public auth/login shell centered and card-sized. */
body.epem-portal-page .epem-portal.epem-public-screen,
body.epem-standalone-portal .epem-portal.epem-public-screen{
    width:auto!important;
    max-width:1060px!important;
    margin:58px auto 72px!important;
}
body.epem-standalone-portal .epem-protected-screen,
body.epem-portal-page .epem-protected-screen{
    display:flex!important;
    align-items:stretch!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-sidebar,
body.epem-portal-page .epem-protected-screen .epem-sidebar{
    flex:0 0 260px!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-main,
body.epem-portal-page .epem-protected-screen .epem-main{
    flex:1 1 auto!important;
    width:calc(100vw - 260px)!important;
    max-width:none!important;
    padding-left:clamp(36px,3vw,64px)!important;
    padding-right:clamp(36px,3vw,64px)!important;
    overflow-x:hidden!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-main > .epem-event-detail-wide,
body.epem-portal-page .epem-protected-screen .epem-main > .epem-event-detail-wide{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-main > .epem-event-detail-wide .epem-event-dashboard-top,
body.epem-portal-page .epem-protected-screen .epem-main > .epem-event-detail-wide .epem-event-dashboard-top,
body.epem-standalone-portal .epem-protected-screen .epem-main > .epem-event-detail-wide .epem-ticket-summary-grid-dynamic,
body.epem-portal-page .epem-protected-screen .epem-main > .epem-event-detail-wide .epem-ticket-summary-grid-dynamic,
body.epem-standalone-portal .epem-protected-screen .epem-main > .epem-event-detail-wide .epem-event-number-bar,
body.epem-portal-page .epem-protected-screen .epem-main > .epem-event-detail-wide .epem-event-number-bar{
    width:100%!important;
    max-width:none!important;
}
.epem-ticket-summary-grid-dynamic{
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr))!important;
    gap:18px!important;
}
.epem-ticket-card-compact .epem-ticket-card-header{
    padding:18px 18px 12px!important;
    gap:8px!important;
}
.epem-ticket-card-compact .epem-ticket-card-header h3{
    font-size:17px!important;
    line-height:1.12!important;
}
.epem-ticket-card-compact .epem-status-badge,
.epem-ticket-card-compact .epem-status-badge.is-published{
    padding:3px 7px!important;
    font-size:8px!important;
    letter-spacing:.04em!important;
    line-height:1!important;
    border-radius:999px!important;
    align-self:start!important;
    min-width:0!important;
    white-space:nowrap!important;
}
.epem-ticket-stat-grid-compact{
    padding:14px!important;
    gap:8px!important;
}
.epem-ticket-stat-grid-compact div{
    padding:11px 12px!important;
}
.epem-ticket-stat-grid-compact dt{
    font-size:9px!important;
    letter-spacing:.08em!important;
}
.epem-ticket-stat-grid-compact dd{
    font-size:14px!important;
}
@media (min-width:1500px){
    .epem-ticket-summary-grid-dynamic{grid-template-columns:repeat(4,minmax(240px,1fr))!important;}
}
@media (min-width:1900px){
    .epem-ticket-summary-grid-dynamic{grid-template-columns:repeat(5,minmax(230px,1fr))!important;}
}
@media (max-width:900px){
    body.epem-standalone-portal .epem-protected-screen,
    body.epem-portal-page .epem-protected-screen{display:block!important;width:100%!important;}
    body.epem-standalone-portal .epem-protected-screen .epem-main,
    body.epem-portal-page .epem-protected-screen .epem-main{width:100%!important;padding:24px 18px!important;}
}

/* Modern Events list */
.epem-events-page{max-width:1680px;width:100%;}
.epem-events-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:22px;}
.epem-events-hero h1{margin:0;font-size:clamp(44px,5vw,78px);line-height:.92;letter-spacing:-.02em;}
.epem-events-hero p{margin:10px 0 0;color:#64748b;font-weight:600;}
.epem-event-search-bar{background:#C0392B;padding:16px 18px;border-radius:16px;box-shadow:0 18px 36px rgba(192,57,43,.22);margin:10px 0 28px;}
.epem-event-search-bar input{width:100%;border:0!important;border-radius:8px!important;background:#fff!important;min-height:56px!important;padding:0 22px!important;font-size:20px!important;box-shadow:none!important;}
.epem-event-filter-row{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 26px;}
.epem-filter-pill{border:1px solid #dbe2ea;background:#fff;border-radius:999px;padding:12px 20px;font-weight:900;color:#111827;cursor:pointer;box-shadow:0 8px 18px rgba(15,23,42,.04);}
.epem-filter-pill span{display:inline-flex;margin-left:8px;min-width:22px;height:22px;align-items:center;justify-content:center;border-radius:999px;background:#f1f5f9;color:#64748b;font-size:12px;}
.epem-filter-pill.is-active{background:#C0392B;color:#fff;border-color:#C0392B;}
.epem-filter-pill.is-active span{background:rgba(255,255,255,.22);color:#fff;}
.epem-event-list-modern{display:grid;gap:18px;}
.epem-event-row-card{display:grid;grid-template-columns:300px minmax(0,1fr);gap:0;background:#fff;border:1px solid #edf0f4;border-radius:18px;overflow:hidden;box-shadow:0 14px 34px rgba(15,23,42,.06);min-height:190px;}
.epem-event-thumb{display:flex;align-items:center;justify-content:center;background:#f1f5f9;min-height:190px;text-decoration:none;overflow:hidden;}
.epem-event-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .2s ease;}
.epem-event-row-card:hover .epem-event-thumb img{transform:scale(1.035);}
.epem-event-thumb span{width:76px;height:76px;border-radius:50%;background:#C0392B;color:#fff;display:flex;align-items:center;justify-content:center;font-size:34px;font-weight:900;}
.epem-event-row-main{padding:26px 28px;display:flex;flex-direction:column;justify-content:space-between;gap:18px;}
.epem-event-row-top{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;}
.epem-event-row-main h2{margin:7px 0 6px;font-size:clamp(22px,2vw,34px);line-height:1.03;max-width:820px;}
.epem-event-row-main h2 a{color:#111827;text-decoration:none;}
.epem-event-row-main h2 a:hover{color:#C0392B;}
.epem-listing-badge{display:inline-flex;align-items:center;padding:5px 12px;border-radius:999px;font-size:12px;font-weight:900;line-height:1;text-transform:uppercase;letter-spacing:.06em;}
.epem-listing-badge.is-listed{background:#d1fae5;color:#047857;}
.epem-listing-badge.is-past{background:#e5e7eb;color:#374151;}
.epem-listing-badge.is-draft{background:#fef3c7;color:#92400e;}
.epem-event-meta-line,.epem-event-location{margin:0;color:#64748b;font-size:16px;font-weight:700;}
.epem-event-location{margin-top:4px;font-size:14px;}
.epem-event-row-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end;min-width:260px;}
.epem-event-row-actions a{display:inline-flex;padding:9px 13px;border-radius:9px;background:#111827;color:#fff!important;text-decoration:none;font-weight:900;font-size:13px;}
.epem-event-row-actions a:first-child{background:#C0392B;}
.epem-event-warning{display:inline-flex;align-self:flex-start;gap:8px;border-radius:10px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;padding:10px 13px;font-weight:900;font-size:13px;text-transform:uppercase;letter-spacing:.03em;}
.epem-empty-panel{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:34px;box-shadow:0 14px 34px rgba(15,23,42,.06);}
.epem-empty-state{background:#fff;border:1px dashed #cbd5e1;border-radius:14px;padding:18px;font-weight:800;color:#64748b;}
@media (max-width: 900px){.epem-events-hero{flex-direction:column;align-items:flex-start}.epem-event-row-card{grid-template-columns:1fr}.epem-event-thumb{height:220px}.epem-event-row-top{flex-direction:column}.epem-event-row-actions{justify-content:flex-start;min-width:0}.epem-event-search-bar input{font-size:16px!important}}

/* v1.0.34: Event listing redesign, compact multi-card layout */
.epem-events-page{
    max-width:none!important;
    width:100%!important;
    padding-right:clamp(18px,3vw,48px);
}
.epem-events-hero{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end!important;
    gap:22px!important;
    margin-bottom:18px!important;
}
.epem-events-hero h1{
    font-size:clamp(44px,4.4vw,68px)!important;
    line-height:.9!important;
    margin:0!important;
}
.epem-events-hero p{
    max-width:720px;
    margin-top:8px!important;
    font-size:15px;
}
.epem-events-hero .epem-button{
    min-width:150px;
    align-self:center;
}
.epem-event-search-bar{
    background:transparent!important;
    box-shadow:none!important;
    padding:0!important;
    margin:0 0 14px!important;
    max-width:720px;
}
.epem-event-search-bar input{
    min-height:48px!important;
    font-size:16px!important;
    border:1px solid #d8dee8!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:0 10px 28px rgba(15,23,42,.05)!important;
}
.epem-event-filter-row{
    display:flex!important;
    align-items:center;
    gap:10px!important;
    margin:0 0 22px!important;
    padding:6px;
    background:#fff;
    border:1px solid #e7ebf0;
    border-radius:18px;
    box-shadow:0 12px 30px rgba(15,23,42,.05);
    width:max-content;
    max-width:100%;
}
.epem-filter-pill{
    border-radius:12px!important;
    min-height:38px!important;
    padding:9px 16px!important;
    font-size:12px!important;
    box-shadow:none!important;
    white-space:nowrap;
}
.epem-filter-pill span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:22px;
    height:22px;
    margin-left:7px;
    border-radius:999px;
    background:rgba(255,255,255,.18);
}
.epem-filter-pill:not(.is-active) span{
    background:#f1f5f9;
    color:#334155;
}
.epem-event-list-modern{
    display:grid!important;
    grid-template-columns:repeat(auto-fill,minmax(340px,1fr));
    gap:22px!important;
    align-items:stretch;
    width:100%;
}
.epem-event-row-card{
    display:flex!important;
    flex-direction:column;
    min-height:0!important;
    border-radius:22px!important;
    border:1px solid #e8edf3!important;
    overflow:hidden!important;
    background:#fff!important;
    box-shadow:0 18px 45px rgba(15,23,42,.07)!important;
    transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.epem-event-row-card:hover{
    transform:translateY(-2px);
    border-color:rgba(192,57,43,.24)!important;
    box-shadow:0 24px 58px rgba(15,23,42,.10)!important;
}
.epem-event-thumb{
    width:100%!important;
    min-height:0!important;
    height:210px!important;
    background:#eef2f7!important;
}
.epem-event-thumb img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
}
.epem-event-row-main{
    padding:18px 18px 16px!important;
    flex:1;
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    gap:14px!important;
    min-height:240px!important;
}
.epem-event-row-top{
    display:flex!important;
    flex-direction:column!important;
    gap:14px!important;
    justify-content:flex-start!important;
    flex:1!important;
    min-height:0!important;
}
.epem-event-row-main h2{
    margin:9px 0 7px!important;
    font-size:clamp(18px,1.4vw,24px)!important;
    line-height:1.08!important;
    letter-spacing:-.01em;
    max-width:none!important;
    display:-webkit-box!important;
    -webkit-line-clamp:3!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
}
.epem-event-meta-line,
.epem-event-location{
    font-size:14px!important;
    line-height:1.35!important;
    font-weight:700!important;
}
.epem-event-location{
    display:inline-flex;
    align-items:center;
    margin-top:8px!important;
    padding:8px 10px;
    border-radius:999px;
    background:#f4f7fb;
    color:#475569!important;
    max-width:100%;
}
.epem-listing-badge{
    display:inline-flex!important;
    width:max-content;
    border-radius:999px!important;
    padding:6px 11px!important;
    font-size:11px!important;
    font-weight:900!important;
    letter-spacing:.07em!important;
    text-transform:uppercase!important;
}
.epem-event-row-actions{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:8px!important;
    min-width:0!important;
    justify-content:stretch!important;
    width:100%;
    margin-top:auto!important;
    flex-shrink:0!important;
}
.epem-event-row-actions a{
    justify-content:center!important;
    text-align:center!important;
    padding:10px 6px!important;
    border-radius:11px!important;
    font-size:12px!important;
    line-height:1!important;
    white-space:nowrap!important;
    min-width:0!important;
    box-sizing:border-box!important;
    /* Kill theme hover jitter */
    transform:none!important;
    transition:background .15s ease!important;
    will-change:auto!important;
    box-shadow:none!important;
}
.epem-event-row-actions a:hover{
    transform:none!important;
    box-shadow:none!important;
    text-decoration:none!important;
    border-bottom:none!important;
}
.epem-event-warning{
    width:100%;
    align-self:stretch!important;
    justify-content:center;
    text-align:center;
    border-radius:12px!important;
    padding:10px 12px!important;
    font-size:11px!important;
}
.epem-empty-panel{
    max-width:720px;
}
@media (min-width: 1700px){
    .epem-event-list-modern{grid-template-columns:repeat(auto-fill,minmax(380px,1fr));}
    .epem-event-thumb{height:230px!important;}
}
@media (max-width: 1100px){
    .epem-events-hero{grid-template-columns:1fr!important;align-items:start!important;}
    .epem-event-filter-row{width:100%;overflow:auto;flex-wrap:nowrap!important;}
}
@media (max-width: 760px){
    .epem-events-page{padding-right:0;}
    .epem-event-list-modern{grid-template-columns:1fr!important;}
    .epem-event-row-actions{grid-template-columns:repeat(2,minmax(0,1fr));}
    .epem-event-thumb{height:200px!important;}
}

/* v1.0.35: report page formatting and plain-money layout */
.epem-report-page{
    width:100%;
    max-width:none!important;
    padding-right:clamp(18px,3vw,48px);
}
.epem-report-header{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    gap:24px;
    margin-bottom:26px;
}
.epem-report-header h1{
    margin:0;
    max-width:1400px;
    font-size:clamp(42px,4.8vw,78px);
    line-height:.92;
    letter-spacing:-.02em;
}
.epem-report-actions{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:10px;
}
.epem-report-kpi-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(170px,1fr));
    gap:16px;
    margin:0 0 32px;
    width:100%;
}
.epem-report-kpi{
    min-height:128px;
    padding:22px;
    border-radius:18px;
    background:#fff;
    border:1px solid #e7ebf0;
    box-shadow:0 18px 45px rgba(15,23,42,.07);
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    gap:18px;
    overflow:hidden;
}
.epem-report-kpi span{
    color:#6b7280;
    font-size:11px;
    font-weight:900;
    letter-spacing:.10em;
    text-transform:uppercase;
}
.epem-report-kpi strong{
    color:#111827;
    font-size:clamp(24px,2.25vw,38px);
    line-height:1;
    font-weight:900;
    overflow-wrap:anywhere;
}
.epem-report-kpi.is-primary{
    background:#111827;
    border-color:#111827;
}
.epem-report-kpi.is-primary span,
.epem-report-kpi.is-primary strong{
    color:#fff;
}
.epem-report-section-header{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px;
    margin:10px 0 16px;
}
.epem-report-section-header h2{
    margin:0;
    font-size:clamp(32px,4vw,56px);
    line-height:.96;
}
.epem-report-table-wrap{
    width:100%;
    overflow-x:auto;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    box-shadow:0 18px 45px rgba(15,23,42,.06);
    margin-bottom:24px;
}
.epem-report-table{
    width:100%;
    max-width:none!important;
    min-width:1120px;
    border:0!important;
    border-collapse:separate;
    border-spacing:0;
    background:#fff;
}
.epem-report-table th{
    padding:16px 14px;
    text-align:left;
    white-space:nowrap;
    background:#f8fafc!important;
    border-bottom:1px solid #dbe2ea;
    color:#475569;
    font-size:11px;
    font-weight:900;
    letter-spacing:.09em;
    text-transform:uppercase;
}
.epem-report-table td{
    padding:16px 14px;
    border-bottom:1px solid #eef2f7;
    color:#111827;
    font-size:14px;
    font-weight:700;
    vertical-align:middle;
    white-space:nowrap;
}
.epem-report-table tbody tr:last-child td{
    border-bottom:0;
}
.epem-report-table tbody tr:hover td{
    background:#fbfdff;
}
.epem-report-ticket-name{
    min-width:250px;
    max-width:360px;
    white-space:normal!important;
    font-weight:900!important;
}
.epem-report-two-col{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
    width:100%;
    margin-bottom:60px;
}
.epem-report-adjustments{
    padding:24px;
}
.epem-report-adjustments h3{
    margin:0 0 18px;
    font-size:26px;
    line-height:1;
}
.epem-report-event-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:16px;
    margin-top:18px;
}
.epem-report-event-card{
    display:flex;
    flex-direction:column;
    gap:12px;
    padding:20px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    color:#111827;
    text-decoration:none;
    box-shadow:0 14px 34px rgba(15,23,42,.06);
}
.epem-report-event-card strong{
    font-size:18px;
    line-height:1.2;
}
.epem-report-event-card span{
    color:#C0392B;
    font-weight:900;
}
@media (max-width:1500px){
    .epem-report-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:900px){
    .epem-report-header{grid-template-columns:1fr;}
    .epem-report-actions{justify-content:flex-start;}
    .epem-report-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    .epem-report-two-col{grid-template-columns:1fr;}
}
@media (max-width:600px){
    .epem-report-kpi-grid{grid-template-columns:1fr;}
}

.epem-auth-success { border-color: rgba(16, 185, 129, 0.25) !important; background: rgba(16, 185, 129, 0.08) !important; color: #065f46 !important; }
button[disabled] { opacity: 0.7; cursor: not-allowed; }

/* v1.0.44: modern dashboard redesign */
.epem-dashboard-modern{
    width:100%;
    max-width:1320px;
}
.epem-dashboard-hero{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:28px;
    align-items:start;
    margin-bottom:30px;
    padding:30px;
    border:1px solid rgba(226,232,240,.9);
    border-radius:26px;
    background:
        radial-gradient(circle at 88% 0%, rgba(192,57,43,.12), transparent 28%),
        linear-gradient(135deg,#fff 0%,#fff 62%,#fff5f3 100%);
    box-shadow:0 18px 50px rgba(15,23,42,.07);
}
.epem-dashboard-hero h1{
    margin:0 0 10px;
    font-size:clamp(34px,4.6vw,64px);
    line-height:.93;
    letter-spacing:-.04em;
    color:#111827;
}
.epem-dashboard-hero p:not(.epem-eyebrow){
    max-width:720px;
    margin:0;
    color:#536173;
    font-size:16px;
    line-height:1.55;
}
.epem-dashboard-hero-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.epem-button-icon{
    display:inline-flex!important;
    align-items:center;
    gap:8px;
    min-height:44px;
}
.epem-button-icon svg,
.epem-dashboard-kpi-icon svg,
.epem-dashboard-event-meta svg,
.epem-dashboard-event-media svg{
    width:18px;
    height:18px;
    fill:currentColor;
    flex:0 0 auto;
}
.epem-button-secondary{
    background:#111827!important;
    color:#fff!important;
    transition:background .15s ease!important;
    will-change:background;
}
.epem-button-secondary:hover{
    background:#374151!important;
    color:#fff!important;
    text-decoration:none!important;
    transform:none!important;
    box-shadow:none!important;
}
.epem-dashboard-kpi-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(180px,1fr));
    gap:18px;
    margin:0 0 38px;
}
.epem-dashboard-kpi-card{
    display:flex;
    align-items:center;
    gap:16px;
    padding:22px;
    border-radius:22px;
    background:#fff;
    border:1px solid rgba(226,232,240,.95);
    box-shadow:0 18px 42px rgba(15,23,42,.06);
}
.epem-dashboard-kpi-icon{
    display:grid;
    place-items:center;
    width:52px;
    height:52px;
    border-radius:18px;
    background:#fff2f1;
    color:#C0392B;
}
.epem-dashboard-kpi-card span{
    display:block;
    margin-bottom:6px;
    color:#6b7280;
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.11em;
}
.epem-dashboard-kpi-card strong{
    display:block;
    color:#0f172a;
    font-size:34px;
    line-height:1;
    letter-spacing:-.04em;
}
.epem-dashboard-section-head{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:20px;
    margin-bottom:18px;
}
.epem-dashboard-section-head h2{
    margin:0;
    font-size:clamp(34px,4vw,54px);
    line-height:.96;
    letter-spacing:-.04em;
}
.epem-dashboard-section-head > a{
    color:#C0392B;
    font-weight:900;
    text-decoration:none;
}
.epem-dashboard-section-head > a:hover{text-decoration:underline;}
.epem-dashboard-event-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:20px;
}
.epem-dashboard-event-card{
    display:grid;
    grid-template-columns:138px minmax(0,1fr);
    min-height:172px;
    background:#fff;
    border:1px solid rgba(226,232,240,.95);
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 16px 42px rgba(15,23,42,.06);
}
.epem-dashboard-event-media{
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#991b1b,#C0392B);
    color:#fff;
    text-decoration:none;
    min-height:172px;
}
.epem-dashboard-event-media img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.epem-dashboard-event-media span{
    display:grid;
    place-items:center;
    width:58px;
    height:58px;
    border-radius:20px;
    background:rgba(255,255,255,.14);
}
.epem-dashboard-event-media svg{width:30px;height:30px;}
.epem-dashboard-event-body{
    padding:18px;
    display:flex;
    flex-direction:column;
    min-width:0;
}
.epem-dashboard-event-topline{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
    color:#64748b;
    font-size:12px;
    font-weight:800;
}
.epem-status-pill{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:5px 9px;
    background:#e8f8f2;
    color:#047857;
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.06em;
}
.epem-status-draft{background:#fff7ed;color:#c2410c;}
.epem-status-private,.epem-status-unknown{background:#f1f5f9;color:#475569;}
.epem-dashboard-event-body h3{
    margin:0 0 12px;
    font-size:21px;
    line-height:1.08;
    letter-spacing:-.03em;
}
.epem-dashboard-event-body h3 a{
    color:#0f172a;
    text-decoration:none;
}
.epem-dashboard-event-body h3 a:hover{color:#C0392B;}
.epem-dashboard-event-meta{
    display:grid;
    gap:8px;
    color:#536173;
    font-size:13px;
    line-height:1.35;
    margin-bottom:16px;
}
.epem-dashboard-event-meta span{
    display:flex;
    align-items:center;
    gap:7px;
}
.epem-dashboard-event-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:auto;
}
.epem-dashboard-event-actions a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    padding:7px 11px;
    border-radius:10px;
    background:#f8fafc;
    color:#111827;
    text-decoration:none;
    font-size:13px;
    font-weight:900;
    border:1px solid #e2e8f0;
}
.epem-dashboard-event-actions a:hover{
    background:#C0392B;
    color:#fff;
    border-color:#C0392B;
}
.epem-dashboard-empty{
    background:#fff;
    border:1px dashed #cbd5e1;
    border-radius:24px;
    padding:34px;
    box-shadow:0 12px 32px rgba(15,23,42,.04);
}
.epem-dashboard-empty h3{
    margin:0 0 8px;
    font-size:26px;
}
.epem-dashboard-empty p{
    margin:0 0 18px;
    color:#64748b;
}
body.epem-standalone-portal .epem-protected-screen .epem-main > .epem-dashboard-modern,
body.epem-portal-page .epem-protected-screen .epem-main > .epem-dashboard-modern{
    max-width:1320px!important;
}
@media(max-width:1100px){
    .epem-dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(180px,1fr));}
    .epem-dashboard-hero{grid-template-columns:1fr;}
    .epem-dashboard-hero-actions{justify-content:flex-start;}
}
@media(max-width:640px){
    .epem-dashboard-hero{padding:22px;}
    .epem-dashboard-kpi-grid{grid-template-columns:1fr;}
    .epem-dashboard-section-head{display:block;}
    .epem-dashboard-event-card{grid-template-columns:1fr;}
    .epem-dashboard-event-media{height:190px;}
}

/* v1.0.45: dashboard icon safety and layout stabilization */
.epem-dashboard-modern .epem-ui-icon{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:24px!important;
    height:24px!important;
    min-width:24px!important;
    max-width:24px!important;
    max-height:24px!important;
    border-radius:8px!important;
    background:rgba(192,57,43,.12)!important;
    color:#C0392B!important;
    font-family:Arial, Helvetica, sans-serif!important;
    font-size:11px!important;
    line-height:1!important;
    font-weight:900!important;
    letter-spacing:0!important;
    text-transform:none!important;
    overflow:hidden!important;
}
.epem-dashboard-modern .epem-button-icon .epem-ui-icon{
    background:rgba(255,255,255,.2)!important;
    color:inherit!important;
    width:22px!important;
    height:22px!important;
    min-width:22px!important;
    font-size:14px!important;
}
.epem-dashboard-kpi-icon .epem-ui-icon{
    background:transparent!important;
    color:#C0392B!important;
    width:28px!important;
    height:28px!important;
    min-width:28px!important;
    max-width:28px!important;
    max-height:28px!important;
    font-size:11px!important;
}
.epem-dashboard-event-media .epem-ui-icon{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    max-height:34px!important;
    background:rgba(255,255,255,.18)!important;
    color:#fff!important;
    font-size:11px!important;
}
.epem-dashboard-event-meta .epem-ui-icon{
    width:20px!important;
    height:20px!important;
    min-width:20px!important;
    max-width:20px!important;
    max-height:20px!important;
    font-size:9px!important;
}
.epem-dashboard-modern svg{
    width:18px!important;
    height:18px!important;
    max-width:18px!important;
    max-height:18px!important;
    overflow:hidden!important;
}
.epem-dashboard-modern{
    min-height:0!important;
}
.epem-dashboard-hero{
    min-height:0!important;
}


/* v1.0.49 dashboard spacing refinement */
#epem-dashboard-v1049 .dash-kpis{gap:22px!important;margin-bottom:36px!important;}
#epem-dashboard-v1049 .dash-kpi{padding:26px 28px!important;gap:18px!important;min-height:124px!important;}
#epem-dashboard-v1049 .dash-kpi-mark{width:50px!important;height:50px!important;min-width:50px!important;max-width:50px!important;flex-basis:50px!important;}
#epem-dashboard-v1049 .dash-events{gap:26px!important;grid-template-columns:repeat(auto-fit,minmax(420px,1fr))!important;}
#epem-dashboard-v1049 .dash-event{grid-template-columns:180px minmax(0,1fr)!important;min-height:218px!important;}
#epem-dashboard-v1049 .dash-event-img{min-height:218px!important;}
#epem-dashboard-v1049 .dash-event-body{padding:24px 26px!important;}
#epem-dashboard-v1049 .dash-event-top{margin-bottom:14px!important;gap:14px!important;}
#epem-dashboard-v1049 .dash-event h3{margin-bottom:14px!important;}
#epem-dashboard-v1049 .dash-meta{gap:9px!important;margin-bottom:20px!important;}
#epem-dashboard-v1049 .dash-event-actions{gap:12px!important;padding-top:4px!important;}
#epem-dashboard-v1049 .dash-event-actions a{min-height:38px!important;padding:9px 14px!important;}
@media(max-width:700px){#epem-dashboard-v1049 .dash-events{grid-template-columns:1fr!important;}#epem-dashboard-v1049 .dash-event{grid-template-columns:1fr!important;}#epem-dashboard-v1049 .dash-event-img{height:210px!important;}}


/* v1.0.50: exports organization, protected heading refresh, report KPI containment */
body.epem-standalone-portal .epem-protected-screen .epem-main,
body.epem-portal-page .epem-protected-screen .epem-main{
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-main h1,
body.epem-portal-page .epem-protected-screen .epem-main h1,
body.epem-standalone-portal .epem-protected-screen .epem-main h2,
body.epem-portal-page .epem-protected-screen .epem-main h2{
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif!important;
    letter-spacing:-.055em!important;
    font-weight:950!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-main h1,
body.epem-portal-page .epem-protected-screen .epem-main h1{
    font-size:clamp(42px,4.4vw,72px)!important;
    line-height:.94!important;
}
body.epem-standalone-portal .epem-protected-screen .epem-main h2,
body.epem-portal-page .epem-protected-screen .epem-main h2{
    font-size:clamp(30px,3vw,48px)!important;
    line-height:1!important;
}
.epem-page-subtitle{
    margin:8px 0 0;
    color:#536173;
    font-size:17px;
    line-height:1.45;
    font-weight:650;
}
.epem-exports-page{
    width:100%;
    max-width:1320px!important;
}
.epem-exports-header{
    margin-bottom:28px!important;
}
.epem-export-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
    gap:24px;
    margin:0 0 28px;
    align-items:stretch;
}
.epem-export-card{
    display:flex;
    flex-direction:column;
    gap:20px;
    min-height:245px;
    padding:28px!important;
}
.epem-export-card h3,
.epem-export-ticket-card h3{
    margin:0 0 10px;
    font-size:clamp(22px,1.6vw,30px);
    line-height:1.05;
}
.epem-export-card p{
    margin:0;
    color:#536173;
    line-height:1.55;
}
.epem-export-card form{
    margin-top:auto;
}
.epem-export-icon{
    width:46px;
    height:46px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:#fff1ef;
    color:#C0392B;
    font-weight:950;
    letter-spacing:.08em;
}
.epem-export-ticket-card{
    padding:28px!important;
    margin-top:4px!important;
}
.epem-export-ticket-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px;
    margin:0 0 20px;
}
.epem-export-ticket-list{
    display:grid;
    gap:12px;
}
.epem-export-ticket-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:16px 18px;
    border:1px solid #e7ebf0;
    border-radius:14px;
    background:#f8fafc;
}
.epem-export-ticket-row strong{
    color:#111827;
    font-size:15px;
    line-height:1.35;
    text-transform:none;
    letter-spacing:0;
}
.epem-report-kpi-grid{
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;
    gap:18px!important;
}
.epem-report-kpi{
    min-height:118px!important;
    padding:20px!important;
}
.epem-report-kpi strong{
    font-size:clamp(22px,1.8vw,30px)!important;
    line-height:1.05!important;
    letter-spacing:-.035em!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
}
.epem-report-kpi span{
    font-size:10px!important;
    line-height:1.25!important;
}
.epem-event-search-bar{
    max-width:520px;
}
.epem-event-list-modern [data-event-group][style*="display: none"]{
    display:none!important;
}
@media(max-width:760px){
    .epem-export-ticket-row{align-items:flex-start;flex-direction:column;}
    .epem-export-card{min-height:0;}
}


/* v1.0.51: event dashboard KPI icons */
.epem-event-number-bar-icons .epem-event-number-card{
    display:flex!important;
    align-items:center!important;
    gap:16px!important;
    min-width:0!important;
}
.epem-event-number-bar-icons .epem-event-number-card > div{
    min-width:0!important;
}
.epem-event-number-icon{
    display:grid!important;
    place-items:center!important;
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    max-width:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    flex:0 0 46px!important;
    border-radius:14px!important;
    background:#fff1ef!important;
    color:#C0392B!important;
    overflow:hidden!important;
    line-height:1!important;
}
.epem-event-number-icon .epem-ui-icon,
.epem-event-number-icon svg{
    display:block!important;
    width:20px!important;
    height:20px!important;
    min-width:20px!important;
    min-height:20px!important;
    max-width:20px!important;
    max-height:20px!important;
    stroke:currentColor!important;
    fill:none!important;
    stroke-width:2.25!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
}
@media(max-width:760px){
    .epem-event-number-bar-icons .epem-event-number-card{gap:12px!important;}
    .epem-event-number-icon{width:42px!important;height:42px!important;min-width:42px!important;max-width:42px!important;flex-basis:42px!important;}
}


/* v1.0.52: event dashboard KPI typography refinement */
.epem-event-number-bar-icons .epem-event-number-card{
    padding:22px 24px!important;
    align-items:center!important;
}
.epem-event-number-bar-icons .epem-event-number-card span:not(.epem-event-number-icon){
    margin-bottom:7px!important;
    font-size:10px!important;
    line-height:1.2!important;
    letter-spacing:.11em!important;
}
.epem-event-number-bar-icons .epem-event-number-card strong{
    font-size:clamp(24px, 2.05vw, 34px)!important;
    line-height:1.05!important;
    letter-spacing:-.035em!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
}
.epem-event-number-bar-icons .epem-event-number-icon{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    max-width:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    flex-basis:44px!important;
}
.epem-event-number-bar-icons .epem-event-number-icon .epem-ui-icon,
.epem-event-number-bar-icons .epem-event-number-icon svg{
    width:19px!important;
    height:19px!important;
    min-width:19px!important;
    min-height:19px!important;
    max-width:19px!important;
    max-height:19px!important;
}
@media (min-width: 1200px){
    .epem-event-number-bar-icons .epem-event-number-card strong{
        font-size:32px!important;
    }
}
@media (max-width: 900px){
    .epem-event-number-bar-icons .epem-event-number-card strong{
        font-size:26px!important;
    }
}


/* Marketing plan badges */
.epem-plan-badge{display:inline-flex;align-items:center;gap:4px;font-size:.75rem;font-weight:800;padding:3px 8px;border-radius:20px;white-space:nowrap;line-height:1.25;vertical-align:middle}
.epem-plan-badge--active{background:#fef3c7;color:#92400e}.epem-plan-badge--none{background:#f3f4f6;color:#6b7280}.epem-plan-badge--upsell{background:transparent;color:#C0392B;border:1px dashed #C0392B;text-decoration:none;font-size:.75rem;padding:2px 8px;border-radius:20px}.epem-plan-badge--upsell:hover{background:#C0392B;color:#fff}.epem-event-row-top .epem-plan-badge{margin-left:8px;margin-top:6px}
.epem-marketing-status-card{margin-top:20px;padding:16px;border-radius:14px;background:#f9fafb;border:1px solid #e5e7eb}.epem-marketing-status-card--active{border-color:#fbbf24;background:#fffbeb}.epem-marketing-status-card--none{border-color:#C0392B;background:#fff5f5}.epem-marketing-status-card-title{font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:#6b7280;margin:0 0 8px}.epem-plan-active-label{font-weight:700;color:#92400e;margin:0 0 6px}.epem-plan-live{color:#065f46;font-weight:700;margin:0 0 8px}.epem-plan-scheduled{color:#1e40af;margin:0 0 8px;font-size:.875rem}.epem-plan-none-text{font-size:.875rem;color:#374151;margin:0 0 10px}.epem-plan-features{list-style:none;margin:0 0 12px;padding:0;font-size:.8125rem;display:flex;flex-direction:column;gap:5px}
.dash-marketing-section{margin-top:34px}.dash-marketing-plans-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px;margin-bottom:20px}.dash-marketing-plan-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:18px;text-align:center;box-shadow:0 12px 28px rgba(15,23,42,.05)}.dash-marketing-plan-icon{font-size:1.75rem;margin-bottom:8px}.dash-marketing-plan-card h3{font-size:.95rem;margin:0 0 5px}.dash-marketing-plan-card p{font-size:.82rem;color:#6b7280;margin:0}.dash-marketing-cta{text-align:center;margin-top:16px}.dash-marketing-caption{font-size:.8125rem;color:#6b7280;margin-top:8px}.dash-marketing-all-active{display:flex;align-items:center;gap:12px;padding:16px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:14px}
.epem-marketing-nudge{display:flex;align-items:flex-start;gap:10px;padding:14px 16px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:12px;margin:20px 0;font-size:.875rem}.epem-marketing-nudge-icon{font-size:1.25rem;flex-shrink:0;margin-top:1px}
.epem-marketing-intro{margin:6px 0 0;color:#374151;max-width:760px}.epem-marketing-event-list{display:flex;flex-direction:column;gap:14px}.epem-marketing-event-row{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding:20px}.epem-marketing-event-info{flex:1;min-width:260px}.epem-marketing-event-info h3{margin:0 0 4px;font-size:1rem}.epem-marketing-event-info a{color:#111827}.epem-marketing-event-date{font-size:.8125rem;color:#6b7280}.epem-marketing-event-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.epem-plan-scheduled-note,.epem-plan-live-note{font-size:.8rem;color:#6b7280}.epem-event-number-card--plan a{text-decoration:none;color:#C0392B}.epem-event-number-card--plan strong{font-size:clamp(1rem,1.2vw,1.2rem)!important;line-height:1.15!important}

/* v1.0.55: attendee actions, export button stability, and free ticket badges. */
body.epem-standalone-portal .epem-screen-actions,
body.epem-portal-page .epem-screen-actions,
.epem-screen-actions {
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:10px!important;
    flex-wrap:wrap!important;
}
body.epem-standalone-portal .epem-inline-export-form,
body.epem-portal-page .epem-inline-export-form,
.epem-inline-export-form {
    display:inline-flex!important;
    align-items:center!important;
    margin:0!important;
    padding:0!important;
    width:auto!important;
    max-width:none!important;
    vertical-align:middle!important;
}
body.epem-standalone-portal .epem-inline-export-form .epem-button,
body.epem-portal-page .epem-inline-export-form .epem-button,
.epem-inline-export-form .epem-button {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:0!important;
    white-space:nowrap!important;
    margin:0!important;
}
.epem-attendees-header .epem-page-actions { min-width:360px; }
.epem-attendee-search-form {
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    flex-wrap:wrap!important;
    margin:0 0 22px!important;
    max-width:900px!important;
}
.epem-attendee-search-form input[type="search"] {
    width:min(420px, 100%)!important;
    min-height:44px!important;
}
.epem-attendees-table-card { max-width:1260px; }
.epem-attendees-table th,
.epem-attendees-table td { vertical-align:middle; }
.epem-ticket-type-badge {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:54px;
    border-radius:999px;
    padding:4px 10px;
    font-size:11px;
    font-weight:900;
    letter-spacing:.06em;
    text-transform:uppercase;
    white-space:nowrap;
}
.epem-ticket-type-badge--free {
    color:#065f46;
    background:#d1fae5;
}
.epem-ticket-type-badge--paid {
    color:#374151;
    background:#eef2f7;
}
@media(max-width:900px){
    .epem-attendees-header { display:block!important; }
    .epem-attendees-header .epem-page-actions { justify-content:flex-start!important; min-width:0!important; margin-top:16px; }
}

/* v1.0.56: attendee cards and inline attendee actions. */
.epem-attendee-screen-header{align-items:flex-start!important;gap:18px!important;}
.epem-back-link{display:inline-flex;align-items:center;gap:6px;margin-bottom:10px;color:#C0392B!important;font-weight:800;text-decoration:none!important;}
.epem-back-link:hover{text-decoration:underline!important;}
.epem-attendee-list{display:flex;flex-direction:column;gap:12px;max-width:1280px;}
.epem-attendee-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;box-shadow:0 14px 34px rgba(15,23,42,.05);transition:border-color .15s,box-shadow .15s,transform .15s;}
.epem-attendee-card:hover{box-shadow:0 18px 44px rgba(15,23,42,.08);transform:translateY(-1px);}
.epem-attendee-card.is-checked-in{border-color:#6ee7b7;background:#f0fdf4;}
.epem-attendee-card-main{display:flex;align-items:center;justify-content:space-between;gap:18px;flex:1;min-width:360px;}
.epem-attendee-identity{display:flex;align-items:center;gap:12px;min-width:240px;}
.epem-attendee-name{display:block;font-weight:900;color:#111827;line-height:1.15;}
.epem-attendee-email{display:block;font-size:.86rem;color:#6b7280;margin-top:3px;}
.epem-attendee-meta{display:flex;flex-wrap:wrap;gap:7px 12px;font-size:.84rem;color:#6b7280;align-items:center;justify-content:flex-end;text-align:right;}
.epem-attendee-ticket{font-weight:800;color:#374151;}
.epem-attendee-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;background:#f3f4f6;border-radius:999px;padding:3px 8px;color:#111827;}
.epem-attendee-checkin-time{color:#065f46;font-weight:700;}
.epem-attendee-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end;}
.epem-attendee-checkin-dot{width:11px;height:11px;border-radius:50%;flex-shrink:0;box-shadow:0 0 0 4px rgba(209,213,219,.35);}
.epem-attendee-checkin-dot.is-in{background:#10b981;box-shadow:0 0 0 4px rgba(16,185,129,.16);}
.epem-attendee-checkin-dot.is-out{background:#d1d5db;}
.epem-attendee-checkin-dot--lg{width:15px;height:15px;}
.epem-button-checked-in{background:#d1fae5!important;color:#065f46!important;border:1px solid #6ee7b7!important;cursor:default!important;justify-content:center;}
.epem-button-ghost{background:transparent!important;color:#374151!important;border:1px solid #d1d5db!important;box-shadow:none!important;}
.epem-button-ghost:hover{background:#f3f4f6!important;color:#111827!important;}
.epem-attendee-detail-layout{max-width:760px;}
.epem-attendee-detail-card{padding:24px!important;border-radius:20px!important;}
.epem-attendee-status-row{display:flex;align-items:center;gap:10px;padding:0 0 16px;margin-bottom:16px;border-bottom:1px solid #e5e7eb;font-size:1rem;}
.epem-attendee-detail-actions{display:flex;flex-direction:column;gap:10px;margin-top:22px;}
.epem-attendee-detail-actions .epem-button{width:100%;text-align:center;justify-content:center;}
.epem-email-modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.52);z-index:10000;display:flex;align-items:center;justify-content:center;padding:18px;}
.epem-email-modal{background:#fff;border-radius:18px;padding:26px;width:100%;max-width:520px;box-shadow:0 24px 70px rgba(0,0,0,.25);}
.epem-email-modal h3{margin:0 0 4px;color:#111827;}
.epem-email-modal label{display:block;font-weight:800;color:#374151;margin-top:14px;}
.epem-email-modal input,.epem-email-modal textarea{width:100%;margin-top:7px;border:1px solid #d1d5db;border-radius:12px;padding:12px;box-sizing:border-box;}
.epem-email-modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px;}
.epem-floating-flash{position:fixed;right:22px;bottom:22px;z-index:10001;max-width:340px;box-shadow:0 15px 35px rgba(15,23,42,.18);}
.epem-attendee-count{color:#6b7280;font-size:.92rem;margin:10px 0 14px;font-weight:700;}
@media(max-width:900px){.epem-attendee-card-main{display:block;min-width:0}.epem-attendee-meta{text-align:left;justify-content:flex-start;margin-top:12px}.epem-attendee-actions{justify-content:flex-start}.epem-attendee-screen-header .epem-screen-header-actions{justify-content:flex-start!important;}}


/* v1.0.57: attendee card spacing and custom form extras visibility. */
.epem-attendee-list{
    gap:18px!important;
    max-width:1420px!important;
}
.epem-attendee-card{
    padding:24px 28px!important;
    gap:24px!important;
    align-items:flex-start!important;
}
.epem-attendee-card-main{
    gap:24px!important;
    align-items:flex-start!important;
    min-width:520px!important;
}
.epem-attendee-identity{
    min-width:300px!important;
    gap:14px!important;
}
.epem-attendee-meta{
    gap:10px 16px!important;
    line-height:1.5!important;
    padding-top:2px!important;
}
.epem-attendee-actions{
    gap:10px!important;
    padding-top:2px!important;
}
.epem-attendee-detail-layout{
    max-width:960px!important;
}
.epem-attendee-detail-card{
    padding:34px 38px!important;
}
.epem-attendee-detail-card .epem-info-list{
    row-gap:14px!important;
    column-gap:28px!important;
}
.epem-attendee-detail-card h3{
    margin-top:28px!important;
    margin-bottom:14px!important;
    font-size:1.05rem!important;
}
.epem-attendee-detail-card h3 + .epem-info-list{
    background:#f8fafc!important;
    border:1px solid #e5e7eb!important;
    border-radius:16px!important;
    padding:18px 20px!important;
}
.epem-attendee-status-row{
    padding:0 0 22px!important;
    margin-bottom:24px!important;
}
.epem-attendee-detail-actions{
    margin-top:28px!important;
    gap:12px!important;
}
@media(max-width:900px){
    .epem-attendee-card{padding:20px!important;}
    .epem-attendee-card-main{min-width:0!important;}
    .epem-attendee-identity{min-width:0!important;}
    .epem-attendee-detail-card{padding:24px!important;}
}

/* v1.0.58: attendee extras from custom form fields. */
.epem-attendee-extras-summary{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px 14px!important;
    margin-top:10px!important;
    font-size:.8rem!important;
    color:#374151!important;
    line-height:1.45!important;
    width:100%!important;
}
.epem-attendee-extra-item{
    display:inline-flex!important;
    align-items:baseline!important;
    gap:4px!important;
    background:#f8fafc!important;
    border:1px solid #e5e7eb!important;
    border-radius:999px!important;
    padding:4px 9px!important;
}
.epem-attendee-extra-label{
    font-weight:800!important;
    color:#6b7280!important;
}

/* v1.0.59: ticket date constraints, fee preview, and stable primary alias. */
.epem-button.epem-primary,
.epem-button-primary{
    background:#C0392B!important;
    color:#fff!important;
}
.epem-button.epem-primary:hover,
.epem-button-primary:hover{
    background:#a93226!important;
    color:#fff!important;
}
.epem-fee-preview{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:10px;
    padding:14px 16px;
    margin-top:-6px;
    margin-bottom:14px;
    max-width:360px;
}
.epem-fee-table{
    width:100%;
    border-collapse:collapse;
    font-size:.875rem;
}
.epem-fee-table td{
    padding:4px 0;
    border:0!important;
}
.epem-fee-table td:last-child{
    text-align:right;
    font-weight:700;
    font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
}
.epem-fee-table tr:last-child td{
    padding-top:8px;
    border-top:1px solid #e5e7eb!important;
    font-weight:800;
}

/* v1.0.61: sidebar icons, tighter event titles, modern ticket screen */
.epem-sidebar-nav a {
    display: flex !important;
    align-items: center;
    gap: 11px;
}
.epem-sidebar-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .92;
}
.epem-sidebar-nav a span { line-height: 1.15; }

body.epem-standalone-portal .epem-event-detail-wide .epem-page-title-block h1,
body.epem-portal-page .epem-event-detail-wide .epem-page-title-block h1,
.epem-event-detail-wide .epem-page-title-block h1 {
    font-size: clamp(42px, 4.4vw, 76px) !important;
    line-height: .96 !important;
    letter-spacing: -.035em;
    max-width: 980px;
}
@media (max-width: 900px) {
    body.epem-standalone-portal .epem-event-detail-wide .epem-page-title-block h1,
    body.epem-portal-page .epem-event-detail-wide .epem-page-title-block h1,
    .epem-event-detail-wide .epem-page-title-block h1 {
        font-size: clamp(28px, 6vw, 42px) !important;
        line-height: 1.15 !important;
        word-break: break-word !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }
}
@media (max-width: 480px) {
    body.epem-standalone-portal .epem-event-detail-wide .epem-page-title-block h1,
    body.epem-portal-page .epem-event-detail-wide .epem-page-title-block h1,
    .epem-event-detail-wide .epem-page-title-block h1 {
        font-size: 22px !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        letter-spacing: -.01em !important;
    }
    .epem-event-hero {
        grid-template-columns: 1fr !important;
    }
    .epem-page-title-block {
        min-width: 0 !important;
        overflow: hidden !important;
    }
}

.epem-ticket-list-modern {
    width: min(100%, 1280px);
}
.epem-ticket-page-header .epem-page-subtitle {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 15px;
}
.epem-ticket-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 18px;
    align-items: stretch;
}
.epem-ticket-modern-card {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .26);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    min-width: 0;
}
.epem-ticket-modern-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}
.epem-ticket-label {
    display: block;
    color: #C0392B;
    text-transform: uppercase;
    letter-spacing: .13em;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 8px;
}
.epem-ticket-modern-card h2,
body .epem-ticket-modern-card h2,
body .epem-content .epem-ticket-modern-card h2 {
    margin: 0 !important;
    padding: 0 !important;
    color: #111827 !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: clamp(1rem, 1.3vw, 1.25rem) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -.01em !important;
    text-transform: none !important;
    border: none !important;
    background: none !important;
}
.epem-ticket-status-badge {
    flex: 0 0 auto;
    font-size: 12px !important;
    letter-spacing: .12em !important;
    padding: 7px 12px !important;
    border-radius: 999px !important;
}
.epem-ticket-status-badge.is-draft {
    background: #fff7ed !important;
    color: #9a3412 !important;
}
.epem-ticket-economics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.epem-ticket-metric {
    background: #f8fafc !important;
    border: 1px solid #eef2f7 !important;
    border-radius: 16px !important;
    padding: 14px !important;
    min-width: 0;
}
.epem-ticket-metric span {
    display: block !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: .1em !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    margin-bottom: 7px !important;
}
.epem-ticket-metric strong {
    display: block !important;
    color: #0f172a !important;
    font-size: clamp(18px, 1.35vw, 24px) !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    overflow-wrap: anywhere;
}
.epem-ticket-metric-price {
    background: #fff5f3 !important;
    border-color: #fde2dd !important;
}
.epem-ticket-detail-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.epem-ticket-detail-strip span {
    display: block !important;
    color: #334155 !important;
    font-size: 13px !important;
    font-weight: normal !important;
    line-height: 1.3 !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    padding: 11px 12px !important;
}
.epem-ticket-detail-strip strong {
    display: block !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: .09em !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    margin-bottom: 4px !important;
}
.epem-ticket-modern-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}
.epem-ticket-modern-actions form { margin: 0; display: inline-flex; }
.epem-ticket-modern-actions .epem-button { white-space: nowrap; }
@media (max-width: 760px) {
    .epem-ticket-grid-modern { grid-template-columns: 1fr; }
    .epem-ticket-economics,
    .epem-ticket-detail-strip { grid-template-columns: 1fr; }
    .epem-ticket-modern-card { padding: 18px; }
}

.epem-attendee-extras-summary {
    width: 100%;
    margin-top: 12px !important;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
}
.epem-attendee-extra-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}
.epem-attendee-detail-card .epem-extras-list,
.epem-attendee-detail-card h3 + .epem-info-list {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}


/* Manual order payment redirect */
.epem-payment-redirect-card {
    max-width: 540px;
    text-align: center;
    margin: 0 auto;
    padding: 32px;
}
.epem-payment-redirect-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.epem-payment-redirect-card h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
}
.epem-payment-redirect-card .epem-info-list {
    text-align: left;
    margin-bottom: 20px;
}
.epem-payment-redirect-note {
    font-size: .875rem;
    color: #6b7280;
    margin-bottom: 20px;
}
.epem-payment-redirect-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.epem-payment-safe-note {
    margin-top: 16px;
    font-size: .8rem;
}
.epem-payment-items-card {
    margin-top: 16px;
}


/* Info alerts */
.epem-alert-info,
.epem-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
}


/* Manual order fulfilment options */
.epem-fulfillment-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin: 8px 0 16px;
}
.epem-fulfillment-legend {
    font-weight: 600;
    padding: 0 0 8px 0;
    font-size: .875rem;
}
/* Field groups replace <p> wrappers — stable block spacing without browser-default p margins */
.epem-field-group {
    display: block;
    margin-bottom: 12px;
}
.epem-fulfillment-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 6px;

}
.epem-fulfillment-option:hover { background: #f9fafb; }
.epem-fulfillment-option input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #C0392B;
}
.epem-fulfillment-option strong { display: block; margin-bottom: 2px; }
.epem-fulfillment-option small { color: #6b7280; }

/* Stable form footer — notice and fulfillment options now render below
   the attendee fields, directly above this footer, so toggling them
   no longer shifts the submit button position. */
.epem-form-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--epem-border);
}

/* Fix Create Order button: !important with literal hex beats WooCommerce theme
   button selectors that inject black on hover, causing ghost double-render. */
#epem-manual-order-submit {
    min-width: 200px;
    width: auto;
    white-space: nowrap;
    justify-content: center;
    background: #b21917 !important;
    color: #fff !important;
    border: 0 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: none !important;
}
#epem-manual-order-submit:hover {
    background: #86110f !important;
    color: #fff !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

/* ── Terms & Conditions ───────────────────────────────────────────────────── */
.epem-auth-terms{font-size:.78rem;color:var(--epem-muted,#6b7280);text-align:center;margin:.75rem 0 0}
.epem-auth-terms a{color:inherit;text-decoration:underline}
.epem-required{color:#b21917;font-weight:700;margin-left:2px}
.epem-required-note{font-size:.82rem;color:var(--epem-muted,#6b7280);margin-bottom:1rem}
.epem-form-terms{margin:1.25rem 0;padding:1rem;background:var(--epem-surface-alt,#f9fafb);border:1px solid var(--epem-border,#e5e7eb);border-radius:8px}
.epem-terms-label{display:flex;align-items:flex-start;gap:.5rem;font-size:.9rem;cursor:pointer}
.epem-terms-label input[type="checkbox"]{margin-top:2px;flex-shrink:0}
.epem-terms-label a{color:var(--epem-primary,#b21917);text-decoration:underline}

/* ── Complimentary badge ─────────────────────────────────────────────────── */
.epem-badge-complimentary{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}

/* ── Inline payment form ─────────────────────────────────────────────── */
.epem-payment-layout{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;align-items:start}
@media(max-width:720px){.epem-payment-layout{grid-template-columns:1fr}}
.epem-payment-form-card .epem-input{width:100%;padding:10px 12px;border:1px solid var(--epem-border,#e5e7eb);border-radius:8px;font-size:.95rem;box-sizing:border-box;margin-top:4px}
.epem-payment-form-card .epem-input:focus{outline:2px solid var(--epem-primary,#b21917);border-color:transparent}
.epem-form-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
@media(max-width:480px){.epem-form-row{grid-template-columns:1fr}}
.epem-alert-success{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0;border-radius:8px;padding:12px 16px;margin-bottom:1rem}

/* ── Marketing plans formatting overrides ───────────────────────────────────
   The theme applies large h2/h3 sizes globally. Scope these tightly so the
   event-row card renders at compact, proportional sizes regardless of theme. */
.epem-marketing-event-row { padding: 14px 18px; }
.epem-marketing-event-row h3,
.epem-marketing-event-info h3 {
    font-size: .9375rem !important;
    font-weight: 700 !important;
    margin: 0 0 3px !important;
    line-height: 1.3 !important;
}
.epem-marketing-event-date {
    font-size: .8rem !important;
    color: #6b7280;
}
.epem-plan-badge--none {
    font-size: .75rem !important;
    font-weight: 600 !important;
}
.epem-marketing-event-status .epem-plan-badge {
    font-size: .75rem !important;
}
.epem-marketing-event-action .epem-button {
    font-size: .8125rem !important;
    padding: 6px 14px !important;
}

/* ── Sidebar footer — organizer profile ──────────────────────────────────── */
.epem-sidebar { display: flex; flex-direction: column; }
.epem-sidebar-nav { flex: 1; }
.epem-sidebar-profile {
    border-top: 1px solid rgba(255,255,255,.18);
    padding: 14px 20px 18px;
    margin-top: auto;
}
.epem-sidebar-profile-name {
    font-size: .8125rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 3px;
}
.epem-sidebar-profile-meta {
    font-size: .75rem;
    color: rgba(255,255,255,.7);
    margin: 0 0 8px;
}
.epem-sidebar-profile-link {
    font-size: .75rem;
    color: rgba(255,255,255,.85) !important;
    text-decoration: underline !important;
    opacity: 1 !important;
    padding: 0 !important;
    display: inline !important;
}
.epem-sidebar-profile-link:hover { color: #fff !important; }

/* ── Marketing plans row — fix edge clipping ─────────────────────────────
   The event row card must not bleed beyond the main content padding.
   Ensure the list and each row card have visible overflow and full padding. */
.epem-marketing-event-list {
    margin-top: 16px;
}
.epem-marketing-event-list .epem-card {
    overflow: visible !important;
}
.epem-marketing-event-row {
    padding: 14px 20px !important;
    gap: 12px;
}

/* ── Check-In App Download Button ───────────────────────────────────────── */
.epem-button-download-app {
    flex-shrink: 0;
}
.epem-checkin-app-link {
    flex-shrink: 0;
}
.epem-checkin-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ── Mobile App Download Banner ─────────────────────────────────────────── */
.epem-app-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #b21917;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.35);
}
.epem-app-banner-image-link {
    display: block;
    flex: 1;
    line-height: 0;
}
.epem-app-banner-img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    object-position: center;
    display: block;
}
.epem-app-banner-dismiss {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(0,0,0,.55);
    border: none;
    border-radius: 50%;
    color: #fff;
    width: 26px;
    height: 26px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 1;
}
.epem-app-banner-dismiss:hover { background: rgba(0,0,0,.8); }

/* Push portal content up so banner doesn't overlap bottom nav on mobile */
@media (max-width: 800px) {
    body:has(#epem-app-banner:not([style*="display:none"])) .epem-portal {
        padding-bottom: 124px;
    }
}

/* ── Clone form footer — kill theme flex/transition on button container ─── */
.epem-form-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--epem-border, #e5e7eb);
}
.epem-form-footer .epem-button,
.epem-form-footer a.epem-button {
    transition: background .15s ease !important;
    transform: none !important;
    will-change: auto !important;
    box-shadow: none !important;
    text-shadow: none !important;
    outline: none !important;
    border-bottom: none !important;
}
.epem-form-footer .epem-button:hover,
.epem-form-footer a.epem-button:hover {
    transform: none !important;
    will-change: auto !important;
    box-shadow: none !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

/* ── Event Charges / Credits KPI cards ──────────────────────────────────── */
.epem-kpi-debit  { color: #dc2626 !important; }
.epem-kpi-credit { color: #16a34a !important; }
.epem-event-number-card--charge { border-top: 2px solid #fecaca !important; }
.epem-event-number-card--credit { border-top: 2px solid #bbf7d0 !important; }

/* ── Event Adjustments report table ─────────────────────────────────────── */
.epem-report-adjustments { margin-top: 28px; margin-bottom: 28px; }
.epem-report-adjustments h3 { margin: 0 0 14px; font-size: 1.0625rem; }
.epem-report-adjustments-table { width: 100%; border-collapse: collapse; }
.epem-report-adjustments-table th,
.epem-report-adjustments-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    font-size: .875rem;
    text-align: left;
}
.epem-report-adjustments-table thead th {
    background: #f8fafc;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
}
.epem-report-adjustments-table tfoot th {
    background: #f8fafc;
    font-weight: 800;
    border-top: 2px solid #e5e7eb;
}
.epem-adj-net-row th { background: #f0fdf4 !important; }
.epem-text-right { text-align: right !important; }
.epem-adj-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.epem-adj-badge--charge { background: #fef2f2; color: #dc2626; }
.epem-adj-badge--credit { background: #f0fdf4; color: #16a34a; }

/* ── AI Event Advisor ───────────────────────────────────────────────────── */
.epem-button-ai-advisor {
    background: linear-gradient(135deg, #b21917, #7c0f0e) !important;
    color: #fff !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}
.epem-button-ai-advisor:hover {
    background: linear-gradient(135deg, #86110f, #5a0a09) !important;
    transform: none !important;
}
.epem-ai-advisor-result { margin: 0 0 24px; }
.epem-ai-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
    font-style: italic;
}
.epem-ai-loading-icon { font-size: 1.25rem; animation: epem-pulse 1.4s ease-in-out infinite; }
@keyframes epem-pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.epem-ai-advisor-card {
    padding: 24px;
    border: 1.5px solid #fde8e8;
    box-shadow: 0 16px 40px rgba(178,25,23,.08);
}
.epem-ai-advisor-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}
.epem-ai-advisor-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #fff1f1;
    color: #b21917;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.epem-ai-advisor-card h3 { margin: 0 0 6px; font-size: clamp(1rem, 1.5vw, 1.35rem) !important; }
.epem-ai-advisor-card h4 {
    margin: 22px 0 10px;
    font-size: .8rem !important;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #b21917;
    font-weight: 900 !important;
}
.epem-ai-advisor-card h5 { margin: 0 0 6px; font-size: .9375rem !important; }
.epem-ai-confidence {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 4px;
}
.epem-ai-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}
.epem-ai-kpi-card,
.epem-ai-action,
.epem-ai-marketing-recommendation {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}
.epem-ai-kpi-card span {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    margin-bottom: 5px;
}
.epem-ai-kpi-card strong {
    display: block;
    font-size: 1.3rem;
    color: #0f172a;
    margin-bottom: 5px;
    font-weight: 900;
}
.epem-ai-kpi-card p { margin: 0; color: #475569; font-size: .83rem; }
.epem-ai-actions { display: grid; gap: 10px; }
.epem-ai-action p,
.epem-ai-marketing-recommendation p { margin: 0 0 8px; color: #475569; font-size: .875rem; }
.epem-ai-action ul,
.epem-ai-marketing-recommendation ul,
.epem-ai-next-steps { margin: 8px 0 0 18px; }
.epem-ai-action ul li,
.epem-ai-marketing-recommendation ul li,
.epem-ai-next-steps li { font-size: .875rem; margin-bottom: 4px; color: #374151; }
.epem-ai-limitations { margin-top: 16px; font-size: .77rem; }
.epem-ai-footer { border-top: 1px solid #f1f5f9; padding-top: 10px; }

/* ── AI Plan Breakdown ───────────────────────────────────────────────────── */
.epem-ai-plan-breakdown { display: grid; gap: 10px; margin-top: 10px; }
.epem-ai-plan-row {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}
.epem-ai-plan-row--recommended {
    border-color: #b21917;
    background: #fff8f8;
}
.epem-ai-plan-row-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.epem-ai-plan-row-header strong { font-size: .9375rem; }
.epem-ai-plan-price {
    font-size: .75rem;
    color: #64748b;
    font-weight: 700;
}
.epem-ai-plan-badge-recommended {
    background: #b21917;
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.epem-ai-plan-badge-current {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-size: .7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.epem-ai-plan-fit {
    font-size: .85rem;
    color: #374151;
    margin: 0 0 6px;
}
.epem-ai-plan-benefits {
    margin: 4px 0 0 16px;
    font-size: .8rem;
    color: #475569;
}
.epem-ai-plan-benefits li { margin-bottom: 2px; }

/* ── AI Advisor dismiss/minimize controls ───────────────────────────────── */
.epem-ai-ctrl-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #e5e7eb;
    background: #f8fafc;
    color: #374151;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .12s, border-color .12s;
    flex-shrink: 0;
}
.epem-ai-ctrl-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.epem-ai-ctrl-btn--close { border-color: #fecaca; color: #dc2626; }
.epem-ai-ctrl-btn--close:hover { background: #fef2f2; border-color: #f87171; }

/* ── AI Sales Health ─────────────────────────────────────────────────────── */
.epem-ai-mkt-secondary { border-color: #e5e7eb !important; opacity: .9; }
.epem-ai-mkt-caveat {
    background: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: .875rem;
}
.epem-sidebar-version{font-size:.65rem;color:rgba(255,255,255,.35);padding:0 20px 14px;margin:0}
.epem-meta-note { font-size:.7rem; font-weight:400; color:#6b7280; }

/* ── Stock level indicators ─────────────────────────────────────────────── */
.epem-ticket-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.epem-stock-indicator {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,.6);
}
/* Green  — < 50% sold */
.epem-stock-green  { background: #22c55e; }
/* Yellow — 50–79% sold */
.epem-stock-yellow { background: #eab308; }
/* Orange — 80–99% sold */
.epem-stock-orange { background: #f97316; }
/* Red    — sold out */
.epem-stock-red    { background: #ef4444; }

/* ── Payout meta in Net Revenue KPI card ────────────────────────────────── */
.epem-net-revenue-card { align-items: flex-start !important; }
.epem-net-revenue-card .epem-event-number-icon { margin-top: 4px; flex-shrink: 0; }
.epem-payout-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
    font-size: .72rem;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.3;
}
.epem-payout-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.epem-payout-status-label { font-weight: 700; color: #374151; }
.epem-payout-sep { color: #d1d5db; }
.epem-payout-date, .epem-payout-comment { color: #6b7280; }

/* ── Search form with clear button ─────────────────────────────────────── */
.epem-search-form { position: relative; width: 100%; }
.epem-search-clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    font-size: .85rem; color: #9ca3af; text-decoration: none; line-height: 1;
    padding: 4px;
}
.epem-search-clear:hover { color: #374151; }

/* ── WordPress Admin Bar compatibility ──────────────────────────────────── */
/* WordPress adds margin-top:32px to <html> when admin bar is visible.      */
/* The portal sidebar uses position:sticky;top:0 which needs to offset by   */
/* the admin bar height so it doesn't slide under it.                       */
body.admin-bar.epem-portal-page .epem-protected-screen .epem-sidebar,
body.admin-bar.epem-standalone-portal .epem-protected-screen .epem-sidebar {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    body.admin-bar.epem-portal-page .epem-protected-screen .epem-sidebar,
    body.admin-bar.epem-standalone-portal .epem-protected-screen .epem-sidebar {
        top: 46px !important;
    }
}

/* Admin bar gap fix: WP sets margin-top:32px on <html>.
   Match that background so no white strip appears above the portal. */
html:has(body.admin-bar.epem-portal-page),
html:has(body.admin-bar.epem-standalone-portal) {
    background: #f4f6f8 !important;
}

/* ── v1.8.23: hard admin-bar suppression on portal pages ───────────────── */
/* show_admin_bar(false) is called in PHP, but page caches may serve stale  */
/* HTML with #wpadminbar already rendered. Hide it and neutralise the        */
/* margin-top WordPress injects on <html> via admin-bar.min.css.            */
body.epem-portal-page #wpadminbar,
body.epem-standalone-portal #wpadminbar {
    display: none !important;
}
html.wp-toolbar body.epem-portal-page,
body.admin-bar.epem-portal-page,
body.admin-bar.epem-standalone-portal {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
/* The WP inline style targets <html>, so we need to override it here too. */
html:has(body.epem-portal-page),
html:has(body.epem-standalone-portal) {
    margin-top: 0 !important;
}

/* ── v1.8.25: unlisted badge + publish button ───────────────────────────── */
.epem-listing-badge.is-unlisted { background: #ede9fe; color: #5b21b6; }
.epem-status-badge.is-draft { background: #fef3c7; color: #92400e; }
.epem-status-badge.is-unlisted { background: #ede9fe; color: #5b21b6; }

/* Publish button in event row actions — matches the anchor style but green tint */
.epem-event-row-actions .epem-publish-event-btn {
    display: inline-flex;
    align-items: center;
    background: #166534 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    line-height: 1.2;
}
.epem-event-row-actions .epem-publish-event-btn:hover { background: #14532d !important; }
.epem-event-row-actions .epem-publish-event-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Publish Event button on detail page */
.epem-button-publish {
    background: #166534 !important;
    color: #fff !important;
}
.epem-button-publish:hover { background: #14532d !important; color: #fff !important; }

/* ── v1.8.26: danger button ─────────────────────────────────────────────── */
.epem-button-danger,
.epem-button.epem-button-danger {
    background: transparent !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
    box-shadow: none !important;
}
.epem-button-danger:hover,
.epem-button.epem-button-danger:hover {
    background: #fef2f2 !important;
    color: #7f1d1d !important;
    border-color: #f87171 !important;
}
/* Danger variant for small row-action buttons (no epem-button class) */
.epem-event-row-actions .epem-trash-event-btn {
    display: inline-flex;
    align-items: center;
    background: transparent !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    line-height: 1.2;
}
.epem-event-row-actions .epem-trash-event-btn:hover { background: #fef2f2 !important; }
.epem-event-row-actions .epem-trash-event-btn:disabled { opacity: .55; cursor: not-allowed; }
