@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&family=Zilla+Slab:wght@500;600&display=swap');

:root {
    --ed-ink: #1a1c1b;
    --ed-muted: #6b706f;
    --ed-green: #00695a;
    --ed-green-dark: #004d42;
    --ed-mint: #e0f2f0;
    --ed-coral: #a52d20;
    --ed-gold: #c8a44a;
    --ed-line: #dce4e1;
    --ed-paper: #ffffff;
    --ed-wash: #f5f7f6;
    --ed-font-heading: "Zilla Slab", Georgia, serif;
    --ed-font-body: "Montserrat", system-ui, sans-serif;
}

.ed-app {
    color: var(--ed-ink);
    font-family: var(--ed-font-body);
    margin: 0 auto;
    max-width: 1440px;
    padding: 24px;
}

.ed-header {
    align-items: center;
    background: var(--ed-green);
    border-radius: 8px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    min-height: 148px;
    padding: 28px 32px;
}

.ed-header h1 { color: #fff; font-family: var(--ed-font-heading); font-size: 32px; font-weight: 600; letter-spacing: 0; line-height: 1.12; margin: 2px 0 8px; }
.ed-header p { margin: 0; max-width: 680px; }
.ed-eyebrow { color: #c4e5df; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.ed-header-stat { align-items: center; border-left: 1px solid rgba(255,255,255,.28); display: flex; flex-direction: column; min-width: 150px; padding: 10px 0 10px 28px; }
.ed-header-stat strong { font-family: var(--ed-font-heading); font-size: 36px; font-weight: 600; }
.ed-header-stat span { color: #d9eeea; font-size: 12px; }
.ed-header-actions { align-items: center; display: flex; gap: 24px; }
.ed-header button.ed-help-button { align-items: center; appearance: none; background: #fff !important; border: 1px solid #fff !important; border-radius: 999px !important; box-shadow: none !important; color: var(--ed-green-dark) !important; font-family: var(--ed-font-body); font-size: 14px; font-weight: 600; gap: 8px; letter-spacing: 0; line-height: 1.4; margin: 0; text-transform: none; transition: background-color 200ms ease, border-color 200ms ease; white-space: nowrap; }
.ed-header button.ed-help-button:hover { background: var(--ed-wash) !important; border-color: var(--ed-wash) !important; color: var(--ed-green-dark) !important; }
.ed-header button.ed-help-button:focus-visible { outline: 3px solid var(--ed-gold); outline-offset: 3px; }
.ed-help-button span { align-items: center; border: 1px solid currentColor; border-radius: 50%; display: inline-flex; font-size: 12px; height: 20px; justify-content: center; width: 20px; }

.ed-panel { background: var(--ed-paper); border: 1px solid var(--ed-line); border-radius: 8px; margin-top: 18px; }
.ed-panel-heading { align-items: center; display: flex; justify-content: space-between; padding: 18px 22px; }
.ed-panel-heading h2, .ed-dialog h2 { font-family: var(--ed-font-heading); font-size: 21px; font-weight: 600; letter-spacing: 0; margin: 0 0 4px; }
.ed-panel-heading p, .ed-dialog > p { color: var(--ed-muted); margin: 0; }
.ed-icon-button { align-items: center; background: var(--ed-green); border: 0; border-radius: 50%; color: #fff; cursor: pointer; display: inline-flex; font-size: 24px; height: 38px; justify-content: center; width: 38px; }

.ed-form { border-top: 1px solid var(--ed-line); display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 22px; }
.ed-form[hidden] { display: none; }
.ed-field { min-width: 0; }
.ed-field-wide, .ed-form-actions { grid-column: 1 / -1; }
.ed-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.ed-field input, .ed-field select, .ed-toolbar input, .ed-toolbar select { background: #fff; border: 1px solid #b9c8c2; border-radius: 8px; box-sizing: border-box; color: var(--ed-ink); font: inherit; min-height: 42px; padding: 8px 10px; width: 100%; }
.ed-field input:focus, .ed-field select:focus, .ed-toolbar input:focus, .ed-toolbar select:focus { border-color: var(--ed-green); box-shadow: 0 0 0 3px rgba(0,105,90,.14); outline: 0; }
.ed-field small { color: var(--ed-muted); display: block; margin-top: 6px; }
.ed-field small.is-selected { color: var(--ed-green-dark); font-weight: 700; }
.ed-autocomplete { position: relative; }
.ed-results { background: #fff; border: 1px solid var(--ed-line); box-shadow: 0 12px 24px rgba(23,53,47,.13); left: 0; max-height: 260px; overflow-y: auto; position: absolute; right: 0; top: 70px; z-index: 5; }
.ed-results button { background: #fff; border: 0; border-bottom: 1px solid var(--ed-line); color: var(--ed-ink); cursor: pointer; display: block; padding: 11px 12px; text-align: left; width: 100%; }
.ed-results button:hover, .ed-results button:focus { background: var(--ed-mint); }
.ed-results p { margin: 0; padding: 12px; }
.ed-form-actions { align-items: center; display: flex; gap: 16px; justify-content: flex-end; }
.ed-form-response { color: var(--ed-green-dark); margin: 0 auto 0 0; }
.ed-form-response.is-error, .ed-results .is-error { color: #a52d20; }

.ed-app .ed-button { align-items: center; appearance: none; background-image: none; border: 0; border-radius: 999px; box-shadow: none; cursor: pointer; display: inline-flex; font-family: var(--ed-font-body); font-size: 14px; font-weight: 600; justify-content: center; letter-spacing: 0; line-height: 1.4; min-height: 40px; padding: 10px 18px; text-decoration: none; text-transform: none; transition: background-color 200ms ease, color 200ms ease; }
.ed-button-primary { background: var(--ed-green); color: #fff; }
.ed-button-primary:hover { background: var(--ed-green-dark); color: #fff; }
.ed-button-light { background: #fff; color: var(--ed-ink); }
.ed-button-secondary { background: var(--ed-wash); color: var(--ed-ink); }
.ed-button:focus-visible { outline: 3px solid var(--ed-gold); outline-offset: 2px; }
.ed-button:disabled { cursor: wait; opacity: .6; }
.ed-link-button { background: transparent; border: 0; color: var(--ed-green-dark); cursor: pointer; font-weight: 700; padding: 4px 0; text-decoration: underline; }

.ed-toolbar { align-items: center; background: var(--ed-wash); display: flex; gap: 10px; justify-content: flex-end; padding: 14px 0; }
.ed-toolbar label { flex: 1; max-width: 420px; }
.ed-toolbar select { width: 220px; }
.ed-table-panel { margin-top: 0; overflow: hidden; }
.ed-table-wrap { overflow-x: auto; }
.ed-table { border-collapse: collapse; min-width: 1080px; width: 100%; }
.ed-table th { background: var(--ed-wash); color: var(--ed-muted); font-size: 11px; padding: 12px; text-align: left; text-transform: uppercase; }
.ed-table td { border-top: 1px solid var(--ed-line); padding: 14px 12px; vertical-align: top; }
.ed-table td strong, .ed-table td small { display: block; }
.ed-table td small { color: var(--ed-muted); margin-top: 4px; max-width: 220px; }
.ed-status { border-left: 3px solid var(--ed-gold); display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 7px; }
.ed-status-confirmed { border-color: var(--ed-green); color: var(--ed-green-dark); }
.ed-status-below_threshold, .ed-status-not_eligible { border-color: var(--ed-coral); color: #963b29; }
.ed-money { color: var(--ed-green-dark); font-size: 17px; }
.ed-muted, .ed-empty { color: var(--ed-muted); }
.ed-empty { padding: 36px !important; text-align: center; }

.ed-kpis { display: grid; gap: 1px; grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.ed-kpis div { background: var(--ed-wash); min-height: 92px; padding: 18px; }
.ed-kpis span, .ed-kpis strong { display: block; }
.ed-kpis span { color: var(--ed-muted); font-size: 12px; }
.ed-kpis strong { font-family: var(--ed-font-heading); font-size: 25px; font-weight: 600; margin-top: 8px; }
.ed-notice { border-left: 4px solid var(--ed-gold); margin: 18px auto; max-width: 1392px; padding: 13px 16px; }
.ed-notice-warning { background: #fff7df; color: #68480a; }

.ed-dialog { border: 0; border-radius: 8px; box-shadow: 0 24px 70px rgba(0,77,66,.24); box-sizing: border-box; color: var(--ed-ink); font-family: var(--ed-font-body); max-width: 620px; padding: 26px; width: calc(100% - 32px); }
.ed-dialog::backdrop { background: rgba(13,35,30,.58); }
.ed-dialog .ed-form { border-top: 0; padding: 20px 0 0; }
.ed-dialog-close { float: right; }
.ed-dialog-close button { background: transparent; border: 0; color: var(--ed-muted); cursor: pointer; font-size: 26px; }
.ed-onboarding { max-width: 700px; }
.ed-onboarding > h2 { font-size: 26px; margin-right: 36px; }
.ed-onboarding .ed-eyebrow { color: var(--ed-green-dark); margin: 0 0 5px; }
.ed-onboarding-progress { display: grid; gap: 8px; grid-template-columns: repeat(4, 1fr); margin: 22px 0; }
.ed-onboarding-progress span { background: var(--ed-line); height: 4px; }
.ed-onboarding-progress span.is-active { background: var(--ed-green); }
.ed-onboarding-steps { min-height: 235px; }
.ed-onboarding-steps section[hidden] { display: none; }
.ed-onboarding-number { align-items: center; background: var(--ed-mint); border-radius: 50%; color: var(--ed-green-dark); display: flex; font-size: 18px; height: 42px; justify-content: center; width: 42px; }
.ed-onboarding-steps h3 { font-family: var(--ed-font-heading); font-size: 23px; font-weight: 600; letter-spacing: 0; margin: 16px 0 8px; }
.ed-onboarding-steps p { color: var(--ed-muted); font-size: 15px; line-height: 1.6; margin: 8px 0; }
.ed-onboarding-footer { align-items: center; border-top: 1px solid var(--ed-line); display: flex; justify-content: space-between; padding-top: 18px; }
.ed-onboarding-footer > span { color: var(--ed-muted); font-size: 13px; }
.ed-onboarding-footer > div { display: flex; gap: 8px; }

@media (max-width: 760px) {
    .ed-app { padding: 12px; }
    .ed-header { align-items: flex-start; flex-direction: column; gap: 18px; padding: 24px 20px; }
    .ed-header h1 { font-size: 27px; }
    .ed-header-actions { align-items: stretch; flex-direction: column-reverse; gap: 12px; width: 100%; }
    .ed-header-stat { align-items: flex-start; border-left: 0; border-top: 1px solid rgba(255,255,255,.28); padding: 12px 0 0; width: 100%; }
    .ed-form { grid-template-columns: 1fr; padding: 18px; }
    .ed-field-wide, .ed-form-actions { grid-column: auto; }
    .ed-form-actions { align-items: stretch; flex-direction: column; }
    .ed-toolbar { align-items: stretch; flex-direction: column; }
    .ed-toolbar label, .ed-toolbar select { max-width: none; width: 100%; }
    .ed-kpis { grid-template-columns: repeat(2, 1fr); }
    .ed-onboarding { padding: 22px; }
    .ed-onboarding-steps { min-height: 300px; }
    .ed-onboarding-footer { align-items: stretch; flex-direction: column; gap: 12px; }
    .ed-onboarding-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
}