:root {
    --navy: #001833;
    --navy-light: #002a5c;
    --blue-banner: #0277bd;
    --blue-banner-dark: #01579b;
    --gold: #D4AF37;
    --gold-dark: #b5952f;
    --bg: #f3f6fa;
    --card: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --border: #e2e8f0;
    --success: #15803d;
    --success-bg: #dcfce7;
    --danger: #b91c1c;
    --danger-bg: #fee2e2;
    --shadow: 0 4px 20px rgba(0, 24, 51, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.ep-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 50;
}

.ep-topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ep-logo img {
    height: 36px;
    width: auto;
    display: block;
}

.ep-breadcrumb {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ep-breadcrumb strong {
    color: var(--navy);
}

.ep-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ep-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--navy);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}

.ep-nav-pill:hover {
    border-color: var(--navy);
    background: #f8fafc;
}

.ep-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.8rem;
    color: var(--navy);
}

.ep-user-pill img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.ep-user-pill button {
    border: none;
    background: none;
    color: var(--danger);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0 0.25rem;
}

.ep-shell {
    max-width: 1380px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
}

.ep-page-header {
    margin-bottom: 1.5rem;
}

.ep-page-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy);
    margin: 0 0 0.25rem;
}

.ep-page-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.ep-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.ep-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 76px;
}

.ep-menu {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.5rem;
    box-shadow: var(--shadow);
}

.ep-menu-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.95rem;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.ep-menu-btn:hover {
    background: #f1f5f9;
    color: var(--navy);
}

.ep-menu-btn.is-active {
    background: #e0f2fe;
    color: #0369a1;
}

.ep-menu-btn .ep-tag {
    margin-left: auto;
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
}

.ep-side-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.ep-side-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--navy);
    margin: 0 0 0.7rem;
}

.ep-preset-btn {
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.45rem;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.15s;
}

.ep-preset-btn:last-child { margin-bottom: 0; }

.ep-preset-btn:hover {
    border-color: var(--blue-banner);
    background: #f0f9ff;
}

.ep-preset-btn strong {
    display: block;
    font-size: 0.8rem;
    color: var(--navy);
}

.ep-preset-btn span {
    font-size: 0.74rem;
    color: var(--success);
    font-weight: 700;
}

.ep-policy-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 0.9rem;
    font-size: 0.78rem;
    color: #78350f;
}

.ep-policy-box strong {
    display: block;
    margin-bottom: 0.3rem;
    color: #92400e;
}

.ep-panel {
    display: none;
}

.ep-panel.is-active {
    display: block;
}

.ep-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.ep-card-banner {
    background: linear-gradient(135deg, var(--blue-banner), var(--blue-banner-dark));
    color: #fff;
    padding: 1.25rem 1.5rem;
}

.ep-card-banner.navy {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
}

.ep-card-banner h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.ep-card-banner p {
    margin: 0;
    font-size: 0.86rem;
    opacity: 0.92;
}

.ep-card-body {
    padding: 1.5rem;
}

.ep-section-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.15rem;
    margin-bottom: 1.15rem;
    background: #fafcff;
}

.ep-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--blue-banner-dark);
    margin: 0 0 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

.ep-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
    margin-bottom: 0.35rem;
}

.ep-field input,
.ep-field select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.92rem;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s;
}

.ep-field input:focus,
.ep-field select:focus {
    outline: none;
    border-color: var(--blue-banner);
    box-shadow: 0 0 0 3px rgba(2, 119, 189, 0.12);
}

.ep-field small {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.74rem;
    color: var(--muted);
}

.ep-readonly-pill {
    padding: 0.65rem 0.85rem;
    border: 1px dashed #d97706;
    border-radius: 10px;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.84rem;
    font-weight: 600;
}

.ep-actions-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1rem;
}

.ep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    border: none;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

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

.ep-btn-primary:hover {
    background: var(--navy-light);
}

.ep-btn-gold {
    background: var(--gold);
    color: var(--navy);
}

.ep-btn-gold:hover {
    background: var(--gold-dark);
    color: #fff;
}

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

.ep-btn-success:hover {
    background: #166534;
}

.ep-btn-outline {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--navy);
}

.ep-btn-outline:hover {
    background: #f8fafc;
}

/* Gated Result Container */
.ep-result-wrap {
    position: relative;
    margin-top: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow);
}

.ep-result-wrap.is-locked .ep-result-content {
    filter: blur(9px);
    user-select: none;
    pointer-events: none;
}

.ep-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 24, 51, 0.72);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 10;
}

.ep-result-wrap:not(.is-locked) .ep-lock-overlay {
    display: none;
}

.ep-lock-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.ep-lock-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #fef3c7;
    color: #b45309;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.ep-lock-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    color: var(--navy);
    margin: 0 0 0.5rem;
}

.ep-lock-card p {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0 0 1.25rem;
}

.ep-google-btn-slot {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.ep-result-content {
    padding: 1.5rem;
}

.ep-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ep-kpi {
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f8fafc;
}

.ep-kpi.highlight {
    background: var(--success-bg);
    border-color: #86efac;
}

.ep-kpi.danger {
    background: var(--danger-bg);
    border-color: #fca5a5;
}

.ep-kpi span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.ep-kpi strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    color: var(--navy);
}

.ep-kpi.highlight strong { color: var(--success); }
.ep-kpi.danger strong { color: var(--danger); }

.ep-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.ep-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.ep-table th,
.ep-table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.ep-table th {
    background: var(--navy);
    color: #fff;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ep-table tr.total-row td {
    background: #f1f5f9;
    font-weight: 700;
    color: var(--navy);
}

.ep-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ep-bar-item label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.ep-bar-track {
    height: 12px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
}

.ep-bar-fill-atual {
    background: #ef4444;
    height: 100%;
}

.ep-bar-fill-synthoil {
    background: #16a34a;
    height: 100%;
}

.ep-le-reco {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-top: 1rem;
}

.ep-le-reco h4 {
    margin: 0 0 0.4rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--navy);
    font-size: 0.95rem;
}

.ep-le-reco p {
    margin: 0.25rem 0;
    font-size: 0.86rem;
}

.ep-what-box {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a5f;
}

.ep-what-box > i {
    color: var(--blue-banner);
    font-size: 1.15rem;
    margin-top: 0.15rem;
}

.ep-what-box strong {
    display: block;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.2rem;
}

.ep-what-box p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
}

.ep-live-dash {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem 1rem 0.35rem;
    margin-bottom: 1rem;
    background: #fff;
    box-shadow: var(--shadow);
}

.ep-live-dash-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--navy);
}

.ep-live-dash-head strong {
    margin-left: auto;
    text-transform: none;
    letter-spacing: 0;
    color: var(--success);
    font-size: 0.92rem;
}

.ep-live-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
    animation: ep-pulse 1.6s infinite;
}

@keyframes ep-pulse {
    70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.ep-live-hint {
    margin: 0 0 0.7rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.ep-section-note {
    font-size: 0.72rem;
    color: #92400e;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.ep-field-wide { grid-column: 1 / -1; }

.ep-label-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.ep-label-row label { margin-bottom: 0; flex: 1; }

.ep-tip {
    position: relative;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #e0f2fe;
    color: var(--blue-banner-dark);
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
}

.ep-tip-bubble {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(260px, 70vw);
    padding: 0.65rem 0.75rem;
    background: var(--navy);
    color: #fff;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 12px 28px rgba(0, 24, 51, 0.25);
}

.ep-tip:hover .ep-tip-bubble,
.ep-tip:focus-visible .ep-tip-bubble,
.ep-tip.is-open .ep-tip-bubble {
    opacity: 1;
    visibility: visible;
}

.ep-wizard-head { margin-bottom: 0.85rem; }

.ep-wizard-kicker {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.55rem;
}

.ep-wizard-kicker span {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue-banner);
}

.ep-wizard-kicker strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.02rem;
    color: var(--navy);
}

.ep-wizard-progress {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.7rem;
}

.ep-wizard-progress span {
    display: block;
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--blue-banner), var(--gold));
    transition: width 0.2s ease;
}

.ep-wizard-dots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
}

.ep-wizard-dot {
    border: 1px solid var(--border);
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 0.4rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.ep-wizard-dot.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.ep-wizard-pane { display: none; }
.ep-wizard-pane.is-active { display: block; }

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

.ep-cost-cards { display: none; }

.ep-cost-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.ep-cost-card summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    font-weight: 700;
    color: var(--navy);
}

.ep-cost-card summary::-webkit-details-marker { display: none; }

.ep-cost-card summary span { font-size: 0.92rem; }

.ep-cost-card summary strong {
    color: var(--success);
    font-size: 0.86rem;
    white-space: nowrap;
}

.ep-cost-card dl {
    margin: 0;
    padding: 0 1rem 0.85rem;
}

.ep-cost-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.86rem;
}

.ep-cost-card dt { color: var(--muted); }
.ep-cost-card dd { margin: 0; text-align: right; font-weight: 600; }

.ep-cost-card.is-total summary { background: #f1f5f9; }

.ep-export-note {
    margin: 0.75rem 0 0;
    color: #92400e;
    font-size: 0.84rem;
    font-weight: 600;
}

.ep-example-note {
    margin: 0 0 0.55rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 600;
}

.ep-example-note[hidden] { display: none; }

.ep-live-caveat {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    color: #92400e;
}

.ep-eco-sticky {
    position: sticky;
    top: 4.35rem;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 24, 51, 0.18);
}

.ep-eco-sticky[hidden] { display: none; }

.ep-eco-sticky span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ep-eco-sticky strong {
    margin-left: auto;
    font-family: 'Montserrat', sans-serif;
    color: var(--gold);
    font-size: 1.05rem;
}

.ep-eco-sticky small {
    width: 100%;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.72rem;
}

@media (max-width: 960px) {
    .ep-layout {
        grid-template-columns: 1fr;
    }
    .ep-sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    .ep-table-wrap { display: none; }
    .ep-cost-cards {
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
        margin-bottom: 1.15rem;
    }
    .ep-wizard-dots { grid-template-columns: 1fr 1fr; }
    .ep-live-dash-head strong { margin-left: 0; }
    .ep-kpi strong { font-size: 1.05rem; }
    .ep-card-body { padding: 1rem; }
}
