/* ═══════════════════════════════════════════════════════════
   Election Applied — Civic campaign operations
   Ink charcoal + ballot crimson + marble mist
   More refined than terracotta/orange legacy portal
   Fonts: loaded once from templates/election-page.php (do not @import —
   duplicate Google CSS blocked parse and doubled remote font downloads).
═══════════════════════════════════════════════════════════ */

:root {
    --ea-ink: #141A22;
    --ea-slate: #2A3441;
    --ea-muted: #6A7585;
    --ea-line: #E2E6EC;
    --ea-paper: #FFFFFF;
    --ea-mist: #F4F6F8;
    --ea-crimson: #C41E3A;
    --ea-crimson-deep: #9B1830;
    --ea-crimson-soft: #FDF0F2;
    --ea-steel: #4A6FA5;
    --ea-shadow: 0 28px 70px rgba(20, 26, 34, .12);
    --ea-font: 'Vazirmatn', 'Figtree', system-ui, sans-serif;
    --ea-display: 'Instrument Serif', 'Vazirmatn', Georgia, serif;
    --ea-ui: 'Figtree', 'Vazirmatn', system-ui, sans-serif;
}

body.el-body {
    margin: 0;
    background: var(--ea-paper);
    font-family: var(--ea-font);
    color: var(--ea-ink);
}

.el-app.ea-applied,
.el-landing.ea-applied {
    min-height: 100vh;
    background: var(--ea-paper);
    color: var(--ea-ink);
}

/* ── Utility bar ── */
.ea-util {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding: 9px 48px;
    background: var(--ea-ink);
    color: rgba(255,255,255,.55);
    font-size: .74rem;
    letter-spacing: .02em;
}
.ea-util a {
    color: rgba(255,255,255,.62);
    text-decoration: none;
    transition: color .2s;
}
.ea-util a:hover { color: #fff; }
.ea-util__accent { color: #F5A3B0 !important; font-weight: 700; }

/* ── Header ── */
.ea-header {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 16px 48px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: box-shadow .3s, border-color .3s;
}
.ea-header--scrolled {
    box-shadow: 0 10px 40px rgba(20, 26, 34, .08);
    border-bottom-color: var(--ea-line);
}
.ea-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}
.ea-brand__mark {
    width: 48px; height: 48px;
    border-radius: 10px;
    background:
        linear-gradient(145deg, var(--ea-ink) 0%, var(--ea-slate) 55%, #3a4554 100%);
    color: #fff;
    display: grid; place-items: center;
    font-family: var(--ea-display);
    font-weight: 400;
    font-size: 1.45rem;
    box-shadow: 0 12px 28px rgba(20, 26, 34, .28);
    border: 1px solid rgba(196, 30, 58, .4);
    position: relative;
}
.ea-brand__mark::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 6px;
    border: 1px solid rgba(196, 30, 58, .35);
    pointer-events: none;
}
.ea-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.ea-brand__name {
    font-family: var(--ea-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -.02em;
}
.ea-brand__name em {
    font-style: italic;
    color: var(--ea-crimson);
}
.ea-brand__sub {
    font-family: var(--ea-ui);
    font-size: .62rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ea-muted);
    font-weight: 600;
    margin-top: 3px;
}
.ea-nav {
    display: flex; align-items: center; gap: 2px;
    margin-right: auto;
}
.ea-nav a, .ea-nav button {
    color: var(--ea-ink);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 4px;
    background: none; border: none;
    cursor: pointer; font-family: inherit;
    transition: background .2s, color .2s;
}
.ea-nav a:hover, .ea-nav button:hover {
    background: var(--ea-mist);
    color: var(--ea-crimson);
}
.ea-header__cta {
    display: inline-flex;
    padding: 12px 22px;
    background: var(--ea-ink);
    color: #fff !important;
    border: none; border-radius: 3px;
    font-weight: 700; font-size: .88rem;
    cursor: pointer; font-family: inherit;
    box-shadow: 0 10px 28px rgba(20, 26, 34, .25);
    transition: transform .2s, background .2s;
}
.ea-header__cta:hover {
    background: var(--ea-slate);
    transform: translateY(-1px);
}
.ea-header__cta--crimson {
    background: linear-gradient(135deg, var(--ea-crimson), var(--ea-crimson-deep));
    box-shadow: 0 10px 28px rgba(196, 30, 58, .35);
}

/* ── Hero — cinematic first viewport ── */
.ea-hero {
    position: relative;
    min-height: calc(100vh - 118px);
    display: grid;
    align-content: end;
    overflow: hidden;
    background: var(--ea-ink);
}
.ea-hero__media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(20,26,34,.92) 0%, rgba(20,26,34,.58) 45%, rgba(20,26,34,.28) 100%),
        linear-gradient(180deg, transparent 38%, rgba(20,26,34,.94) 100%),
        url('/acc-engine/assets/img/election/hero-majles.jpg') center 35%/cover no-repeat;
}
.ea-hero__grain {
    position: absolute; inset: 0; pointer-events: none; z-index: 1;
    opacity: .045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ea-hero__content {
    position: relative;
    z-index: 2;
    padding: 48px 48px 72px;
    max-width: 740px;
    animation: ea-rise 1s cubic-bezier(.22,1,.36,1) both;
}
@keyframes ea-rise {
    from { opacity: 0; transform: translateY(36px); }
    to   { opacity: 1; transform: none; }
}
.ea-hero__brand {
    font-family: var(--ea-display);
    font-size: clamp(2.1rem, 4.8vw, 3.4rem);
    font-weight: 400;
    color: #fff;
    margin: 0 0 16px;
    letter-spacing: -.03em;
    line-height: 1;
}
.ea-hero__brand span { color: #F5A3B0; font-style: italic; }
.ea-hero h1 {
    margin: 0 0 16px;
    font-family: var(--ea-display);
    font-size: clamp(1.75rem, 3.8vw, 2.85rem);
    font-weight: 400;
    color: #fff;
    line-height: 1.22;
    letter-spacing: -.02em;
}
.ea-hero h1 em {
    font-style: italic;
    color: #F5A3B0;
}
.ea-hero__lead {
    margin: 0 0 28px;
    max-width: 520px;
    font-size: 1.06rem;
    line-height: 1.75;
    color: rgba(255,255,255,.7);
}
.ea-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.ea-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 26px; border-radius: 3px;
    font-family: inherit; font-weight: 700; font-size: .94rem;
    cursor: pointer; border: none; text-decoration: none;
    transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.ea-btn--crimson {
    background: linear-gradient(135deg, #D42A48, var(--ea-crimson-deep));
    color: #fff;
    box-shadow: 0 12px 32px rgba(196, 30, 58, .4);
}
.ea-btn--crimson:hover { transform: translateY(-2px); }
.ea-btn--ghost {
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    backdrop-filter: blur(8px);
}
.ea-btn--ghost:hover {
    background: rgba(255,255,255,.16);
    transform: translateY(-2px);
}
.ea-btn--dark {
    background: var(--ea-ink);
    color: #fff;
}
.ea-btn--outline {
    background: transparent;
    color: var(--ea-ink);
    border: 1.5px solid var(--ea-line);
}
.ea-btn--outline:hover {
    border-color: var(--ea-crimson);
    color: var(--ea-crimson);
}

/* ── Sections ── */
.ea-section { padding: 80px 48px; }
.ea-section--mist { background: var(--ea-mist); }
.ea-section--ink {
    background: linear-gradient(160deg, #141A22 0%, #1E2834 55%, #141A22 100%);
    color: #fff;
}
.ea-section__head { max-width: 700px; margin: 0 0 44px; }
.ea-kicker {
    display: inline-block;
    font-family: var(--ea-ui);
    font-size: .68rem; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    color: var(--ea-crimson); margin-bottom: 12px;
}
.ea-section--mist .ea-kicker,
.ea-section:not(.ea-section--ink) .ea-kicker { color: var(--ea-steel); }
.ea-section__head h2 {
    margin: 0 0 12px;
    font-family: var(--ea-display);
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    font-weight: 400;
    letter-spacing: -.02em;
    line-height: 1.15;
}
.ea-section__head p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--ea-muted);
}
.ea-section--ink .ea-section__head p { color: rgba(255,255,255,.65); }
.ea-section--ink .ea-kicker { color: #F5A3B0; }

/* Pillars */
.ea-pillars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--ea-line);
    border-radius: 2px;
    overflow: hidden;
    background: #fff;
}
.ea-pillar {
    padding: 36px 28px;
    border-left: 1px solid var(--ea-line);
    transition: background .3s;
    position: relative;
}
.ea-pillar:first-child { border-left: none; }
.ea-pillar::before {
    content: '';
    position: absolute; top: 0; right: 0; left: 0; height: 3px;
    background: var(--ea-crimson);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .35s ease;
}
.ea-pillar:hover { background: var(--ea-crimson-soft); }
.ea-pillar:hover::before { transform: scaleX(1); }
.ea-pillar__num {
    font-family: var(--ea-display);
    font-size: 2rem;
    color: var(--ea-crimson);
    display: block; margin-bottom: 12px;
}
.ea-pillar strong {
    display: block; margin-bottom: 8px;
    font-size: 1.1rem; font-weight: 700;
}
.ea-pillar span { font-size: .92rem; color: var(--ea-muted); line-height: 1.6; }

/* Stats band */
.ea-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}
.ea-stat { text-align: center; }
.ea-stat strong {
    display: block;
    font-family: var(--ea-display);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 400;
    color: #F5A3B0;
    letter-spacing: -.03em;
}
.ea-stat span {
    font-size: .88rem;
    color: rgba(255,255,255,.58);
    letter-spacing: .04em;
}

/* Access portals */
.ea-portals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 1180px;
    margin: 0 auto;
}
.ea-portal {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 8px; padding: 26px 22px;
    background: #fff;
    border: 1px solid var(--ea-line);
    border-radius: 2px;
    cursor: pointer; text-align: right;
    font-family: inherit; color: inherit;
    transition: border-color .25s, transform .25s, box-shadow .3s;
    position: relative; overflow: hidden;
}
.ea-portal::after {
    content: '';
    position: absolute; inset: auto 0 0 0; height: 2px;
    background: linear-gradient(90deg, var(--ea-crimson), var(--ea-steel));
    transform: scaleX(0); transform-origin: right;
    transition: transform .35s;
}
.ea-portal:hover {
    border-color: var(--ea-steel);
    transform: translateY(-4px);
    box-shadow: var(--ea-shadow);
}
.ea-portal:hover::after { transform: scaleX(1); }
.ea-portal__tag {
    font-size: .65rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--ea-steel);
}
.ea-portal strong {
    font-size: 1.12rem; font-weight: 800;
    font-family: var(--ea-ui);
}
.ea-portal small {
    font-size: .86rem; color: var(--ea-muted); line-height: 1.5;
}
.ea-portal__go {
    margin-top: auto; padding-top: 12px;
    font-size: .84rem; font-weight: 700; color: var(--ea-ink);
}
.ea-portal--admin {
    background: linear-gradient(160deg, #141A22, #243040);
    color: #fff; border-color: transparent;
}
.ea-portal--admin .ea-portal__tag { color: #F5A3B0; }
.ea-portal--admin small { color: rgba(255,255,255,.6); }
.ea-portal--admin strong { color: #fff; }
.ea-portal--admin .ea-portal__go { color: #F5A3B0; }
.ea-portal--field { background: linear-gradient(180deg, #fff 0%, #F0F4FA 100%); }
.ea-portal--finance { background: linear-gradient(180deg, #fff 0%, var(--ea-crimson-soft) 100%); }

/* Story asymmetric */
.ea-story {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 0;
    max-width: 1180px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--ea-line);
}
.ea-story__media {
    min-height: 420px;
    background:
        linear-gradient(135deg, rgba(20,26,34,.4), rgba(74,111,165,.22)),
        url('/acc-engine/assets/img/election/story-majles.jpg') center/cover;
}
.ea-story__body {
    padding: 48px 40px;
    display: flex; flex-direction: column; justify-content: center;
    background: #fff;
}
.ea-story__body h3 {
    margin: 0 0 14px;
    font-family: var(--ea-display);
    font-size: 1.85rem;
    font-weight: 400;
    line-height: 1.25;
}
.ea-story__body p {
    margin: 0 0 24px;
    color: var(--ea-muted);
    line-height: 1.75;
    font-size: .98rem;
}

/* Help */
.ea-help {
    background: var(--ea-ink);
    color: #fff;
    padding: 56px 48px;
}
.ea-help__inner {
    max-width: 1180px; margin: 0 auto;
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between; gap: 28px;
}
.ea-help h2 {
    margin: 0 0 8px;
    font-family: var(--ea-display);
    font-size: 1.9rem;
    font-weight: 400;
}
.ea-help p { margin: 0; color: rgba(255,255,255,.6); }
.ea-help__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ea-help__actions .ea-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,.28);
    color: #fff;
}
.ea-help__actions .ea-btn--solid {
    background: var(--ea-crimson);
    border-color: var(--ea-crimson);
    color: #fff;
}

/* Demo panel — demoted */
.ea-applied .el-demo-panel {
    position: relative;
    z-index: 50;
    border-bottom: 1px solid var(--ea-line);
    background: var(--ea-mist) !important;
}
.ea-applied .el-demo-row {
    border-radius: 4px !important;
    border-color: var(--ea-line) !important;
}

/* Onboarding soft */
.ea-onboard {
    max-width: 560px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border: 1px solid var(--ea-line);
}
.ea-onboard h2 {
    margin: 0 0 8px;
    font-family: var(--ea-display);
    font-size: 1.6rem;
    font-weight: 400;
}
.ea-onboard p { color: var(--ea-muted); margin: 0 0 20px; }

/* Footer */
.ea-footer {
    padding: 28px 48px;
    background: #0A0E14;
    color: rgba(255,255,255,.4);
    font-size: .8rem;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.ea-footer a { color: rgba(255,255,255,.55); text-decoration: none; }
.ea-footer a:hover { color: #F5A3B0; }

/* Reveal */
.ea-reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity .8s ease, transform .8s ease;
}
.ea-reveal.is-in { opacity: 1; transform: none; }

/* Workspace header polish */
.ea-applied.el-workspace .el-header--app,
.el-workspace.ea-applied .el-header--app {
    background: var(--ea-ink) !important;
    border: none !important;
    display: flex !important;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 24px !important;
}
.ea-applied .el-header--app .el-brand {
    font-family: var(--ea-display) !important;
    font-weight: 400 !important;
    color: #fff !important;
    font-size: 1.15rem;
}
.ea-applied .el-header--app .el-role {
    color: rgba(255,255,255,.55) !important;
    font-size: .82rem;
}
.ea-applied .el-tab {
    color: rgba(255,255,255,.65) !important;
    border-radius: 3px;
}
.ea-applied .el-tab--on {
    background: rgba(196, 30, 58, .25) !important;
    color: #fff !important;
    border-bottom: 2px solid var(--ea-crimson) !important;
}
.ea-applied .el-tab--acct.el-tab--on {
    border-bottom-color: #F5A3B0 !important;
}
.ea-ws-mark {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: linear-gradient(145deg, var(--ea-slate), var(--ea-ink));
    border: 1px solid rgba(196, 30, 58, .45);
    color: #fff;
    display: inline-grid; place-items: center;
    font-family: var(--ea-display);
    font-size: 1rem;
    margin-left: 8px;
}

/* Accounting panel */
.ea-abc { padding: 8px 4px 32px; }
.ea-abc__head h2 {
    margin: 6px 0 8px;
    font-family: var(--ea-display);
    font-size: 1.65rem;
    font-weight: 400;
    color: var(--ea-ink);
}
.ea-abc__head p { margin: 0; color: var(--ea-muted); font-size: .92rem; }
.ea-abc__toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 12px 0 16px; }
.ea-abc__toolbar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ea-muted); }
.ea-abc__toolbar input, .ea-abc__toolbar select {
    padding: 8px 10px; border: 1px solid var(--ea-line); border-radius: 4px; min-width: 220px;
    font-family: inherit;
}
.ea-abc__kpis {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
.ea-abc__kpi {
    background: var(--ea-mist); border: 1px solid var(--ea-line);
    padding: 14px 16px; border-radius: 4px;
}
.ea-abc__kpi strong {
    display: block; font-size: 1.25rem; font-family: var(--ea-ui);
    color: var(--ea-ink); font-weight: 800;
}
.ea-abc__kpi span { font-size: .75rem; color: var(--ea-muted); }
.ea-abc__layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.ea-abc__svg { width: 100%; height: auto; background: #f8fafc; border: 1px solid var(--ea-line); border-radius: 4px; }
.ea-abc__side {
    background: #fff; border: 1px solid var(--ea-line); padding: 16px; border-radius: 4px;
}
.ea-abc__side h3 {
    margin: 0 0 12px; font-size: .95rem; color: var(--ea-ink); font-family: var(--ea-ui);
}
.ea-abc__person, .ea-abc__act {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 0; border-bottom: 1px solid var(--ea-line);
}
.ea-abc__person strong, .ea-abc__act b { font-size: .9rem; color: var(--ea-ink); }
.ea-abc__person small, .ea-abc__act small { color: var(--ea-muted); font-size: .75rem; }
.ea-abc__person span { font-weight: 700; color: var(--ea-crimson); font-size: .88rem; margin-top: 4px; }
.ea-abc__muted { color: var(--ea-muted); font-size: .85rem; }
.ea-abc__table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .82rem; }
.ea-abc__table th, .ea-abc__table td {
    padding: 8px 10px; border-bottom: 1px solid var(--ea-line); text-align: right;
}
.ea-abc__table th { background: var(--ea-mist); color: var(--ea-muted); font-weight: 700; }

@media (max-width: 1024px) {
    .ea-pillars, .ea-stats, .ea-portals { grid-template-columns: 1fr 1fr; }
    .ea-story { grid-template-columns: 1fr; }
    .ea-abc__layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .ea-util, .ea-nav { display: none; }
    .ea-header, .ea-section, .ea-help, .ea-hero__content, .ea-footer {
        padding-left: 20px; padding-right: 20px;
    }
    .ea-hero { min-height: 78vh; }
    .ea-pillars, .ea-stats, .ea-portals { grid-template-columns: 1fr; }
    .ea-pillar { border-left: none !important; border-top: 1px solid var(--ea-line); }
    .ea-pillar:first-child { border-top: none; }
    .ea-abc__kpis { grid-template-columns: 1fr 1fr; }
}
