/*
 * "Projekt teilen" dialog (assets/js/ee-share-dialog.js, mockup d). Glass language of the project
 * shell (ee-shell-tokens.css, light/dark from the system). Progress bar yellow -> blue -> green.
 */
.eesh-root { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-start; justify-content: center; padding: max(24px, env(safe-area-inset-top)) 16px 24px; overflow-y: auto; font-family: var(--ees-font); }
.eesh-dim { position: fixed; inset: 0; background: rgba(var(--ee-tint-rgb), .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.eesh-dlg { position: relative; width: min(720px, 100%); margin-top: 60px; border-radius: 34px; padding: 26px 28px 22px; color: var(--ees-text); background: linear-gradient(165deg, rgba(var(--ee-fg-rgb), .10), rgba(var(--ee-fg-rgb), .03) 50%), var(--ees-surface); -webkit-backdrop-filter: var(--ees-backdrop); backdrop-filter: var(--ees-backdrop); border: 1px solid var(--ees-glass-border); box-shadow: var(--ees-glass-shadow), 0 30px 80px rgba(0,0,0,.45); outline: none; }
.eesh-dlg button { font-family: inherit; }
.eesh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eesh-head h2 { margin: 0; font: 700 30px/1.1 var(--ees-font); letter-spacing: -.02em; color: var(--ees-text); }
.eesh-x { width: 44px; height: 44px; margin: -6px -8px -6px 0; border: 0; border-radius: 50%; background: transparent; color: var(--ees-text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.eesh-x::before { content: ''; position: absolute; width: 32px; height: 32px; border-radius: 50%; background: var(--ees-s3, rgba(var(--ee-fg-rgb), .08)); }
.eesh-x .eesh-ico { position: relative; }
.eesh-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.eesh-sub { margin: 6px 0 0; font: 400 13px/1.45 var(--ees-font); color: var(--ees-text-dim); }
.eesh-pv { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 120px; margin-top: 18px; padding: 18px 20px; border-radius: 20px; overflow: hidden; color: var(--ee-text-on-accent); background: linear-gradient(180deg, rgba(var(--ee-ink-rgb), 0) 30%, rgba(0, 0, 0, .65) 100%), radial-gradient(70% 90% at 80% 20%, rgba(255,180,90,.45), transparent 70%), linear-gradient(#1b1a33 0%, #5a3d58 18%, #d9875a 38%, #f3c07e 48%, #8a7a3c 62%, #3a3a1c 100%); }
.eesh-pv small { display: block; font: 500 11px/1.2 var(--ees-font); color: var(--ee-text-secondary); }
.eesh-pv b { display: block; margin-top: 4px; font: 700 24px/1.1 var(--ees-font); letter-spacing: -.02em; }
.eesh-pp { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 18px; background: #30d158; color: #04140a !important; font: 600 13px/1 var(--ees-font); text-decoration: none; white-space: nowrap; }
.eesh-pp--off { opacity: .55; }
.eesh-segs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-top: 18px; border-radius: 14px; background: var(--ees-field); }
.eesh-seg { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border: 0; border-radius: 11px; background: transparent; color: var(--ees-text-dim); text-align: left; font: 600 14px/1.15 var(--ees-font); cursor: pointer; }
.eesh-seg small { display: block; margin-top: 3px; font: 500 11px/1.2 var(--ees-font); color: var(--ees-text-faint); }
.eesh-seg.is-on { background: rgba(var(--ee-fg-rgb), .08); color: var(--ees-text); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.eesh-seg.is-on .eesh-ico { color: var(--ees-accent-strong); }
.eesh-r2 { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; align-items: flex-end; }
.eesh-f { flex: 1 1 220px; min-width: 0; display: block; }
.eesh-lb { display: block; margin: 0 0 8px; font: 600 11px/1 var(--ees-font); letter-spacing: .9px; text-transform: uppercase; color: var(--ees-text-faint); }
h4.eesh-lb { margin: 20px 0 8px; }
.eesh-fld { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px 0 14px; border-radius: 12px; background: var(--ees-field); border: 1px solid var(--ees-border); font: 500 14px/1 var(--ees-font); min-width: 0; flex: 1; }
.eesh-dlg .eesh-fld input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ees-text); font: 500 14px/1 var(--ees-font); letter-spacing: .5px; padding: 0; height: 40px; }
.eesh-fld > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eesh-dlg .eesh-fld .eesh-pw { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 0; height: 40px; line-height: 40px; color: var(--ees-text); -webkit-text-fill-color: var(--ees-text); opacity: 1; font: 600 15px/40px ui-monospace, SFMono-Regular, Menlo, monospace !important; letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eesh-dlg .eesh-fld .eesh-pw--hidden { font-family: var(--ees-font) !important; font-weight: 500; letter-spacing: 0; }
.eesh-hint { display: block; margin-top: 6px; font: 500 12px/1.35 var(--ees-font); color: var(--ees-text-dim); }
.eesh-icn { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: rgba(var(--ee-fg-rgb), .08); color: var(--ees-text); cursor: pointer; }
.eesh-icn:hover { background: rgba(var(--ee-fg-rgb), .16); }
.eesh-icn.is-done { background: #34c759; color: #04140a; }
.eesh-mono { font: 500 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ees-text-dim); }
.eesh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eesh-chip { min-height: 44px; padding: 0 14px; border-radius: 12px; background: rgba(var(--ee-fg-rgb), .04); border: 1px solid var(--ees-border); color: var(--ees-text-dim); font: 600 13px/1 var(--ees-font); cursor: pointer; }
.eesh-chip.is-on { background: var(--ees-accent-soft); border-color: rgba(63,161,77,.5); color: var(--ees-text); }
.eesh-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eesh-list { border-radius: 16px; background: rgba(var(--ee-fg-rgb), .04); border: 1px solid var(--ees-border); }
.eesh-it { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-bottom: 1px solid var(--ees-border); font: 500 14px/1.2 var(--ees-font); cursor: pointer; }
.eesh-it:last-child { border-bottom: 0; }
.eesh-it .eesh-ico { color: var(--ees-text-dim); }
.eesh-it > span { flex: 1; }
.eesh-sens { padding: 4px 8px; border-radius: 8px; background: var(--ees-warn-soft); color: var(--ees-warn); font: 600 11px/1 var(--ees-font); }
.eesh-dlg input.eesh-tg[type="checkbox"] { -webkit-appearance: none !important; appearance: none !important; position: relative !important; display: inline-block !important; flex: none; width: 51px !important; height: 31px !important; min-width: 51px; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 16px !important; background: rgba(120,120,128,.32) !important; box-shadow: none !important; outline-offset: 2px; cursor: pointer; vertical-align: middle; transition: background .25s ease; }
.eesh-dlg input.eesh-tg[type="checkbox"]::before { content: none !important; display: none !important; }
.eesh-dlg input.eesh-tg[type="checkbox"]::after { content: '' !important; display: block !important; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border: 0; border-radius: 50%; background: var(--ee-bg-elevated); box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06); transform: translateX(0); transition: transform .25s cubic-bezier(.3,.7,.4,1); }
.eesh-dlg input.eesh-tg[type="checkbox"]:checked { background: #34c759 !important; }
.eesh-dlg input.eesh-tg[type="checkbox"]:checked::after { transform: translateX(20px); }
.eesh-tg:focus-visible, .eesh-dlg button:focus-visible { outline: 2px solid var(--ees-info); outline-offset: 2px; }
.eesh-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; }
.eesh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(var(--ee-fg-rgb), .08); color: var(--ees-text); font: 600 14px/1 var(--ees-font); white-space: nowrap; cursor: pointer; }
.eesh-btn--sm { min-height: 32px; padding: 0 12px; font-size: 12px; }
.eesh-btn--go { background: var(--ees-accent); color: var(--ee-text-on-accent); }
.eesh-btn:disabled, .eesh-chip:disabled, .eesh-seg:disabled, .eesh-tg:disabled { opacity: .55; cursor: default; }
.eesh-grow { flex: 1; min-width: 0; }
.eesh-note { font: 400 13px/1.4 var(--ees-font); color: var(--ees-text-dim); }
.eesh-ft { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ees-border); font: 500 12px/1.3 var(--ees-font); color: var(--ees-text-dim); }
.eesh-ft b { color: var(--ees-text); font-variant-numeric: tabular-nums; }
.eesh-rev { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--ees-danger); font: 600 13px/1 var(--ees-font); cursor: pointer; }
.eesh-msg { margin-top: 12px; font: 500 13px/1.3 var(--ees-font); color: var(--ees-text-dim); }
.eesh-load { margin-top: 18px; height: 5px; border-radius: 3px; background: rgba(var(--ee-fg-rgb), .08); overflow: hidden; }
.eesh-load i { display: block; height: 100%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, #ffd60a, #0a84ff, #30d158); animation: eesh-run 1.1s ease-in-out infinite; }
@keyframes eesh-run { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (max-width: 640px) {
    .eesh-dlg { margin-top: 0; border-radius: 26px; padding: 20px 18px 18px; }
    .eesh-cols, .eesh-segs { grid-template-columns: 1fr; }
    .eesh-head h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .eesh-load i { animation: none; width: 100%; } }

/* Exposé tab inside the Machbarkeitsanalyse fullscreen: settings (wide, two section columns) left,
   a light preview card right — no embedded Exposé, it opens in a new tab (Till 01.11.2026) */
.eesh-tab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 24px; align-items: start; padding: 4px 0 16px; font-family: var(--ees-font); }
.eesh-dlg--inline { width: auto; max-width: 860px; margin-top: 0; border-radius: 24px; box-shadow: var(--ees-glass-shadow); }
.eesh-prev { position: sticky; top: 0; min-width: 0; }
.eesh-pcard { overflow: hidden; border-radius: 24px; background: var(--ees-surface); border: 1px solid var(--ees-glass-border); box-shadow: var(--ees-glass-shadow); }
.eesh-pcard__img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ee-bg-primary); }
.eesh-pcard__img--none { background: radial-gradient(120% 90% at 30% 20%, rgba(52,199,89,.28), transparent 60%), var(--ee-bg-primary); }
.eesh-pcard__body { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; }
.eesh-pcard__body .eesh-lb { margin: 0; }
.eesh-pcard__title { font: 600 19px/1.25 var(--ees-font); letter-spacing: -.2px; color: var(--ees-text); }
.eesh-pcard__acts { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.eesh-pcard__alt { padding: 6px 2px; border: 0; background: none; color: var(--ees-accent); font: 500 14px/1 var(--ees-font); cursor: pointer; }
.eesh-pcard__alt:hover { text-decoration: underline; }
.eesh-pcard__alt:disabled { opacity: .4; cursor: default; text-decoration: none; }
@media (max-width: 1100px) {
    .eesh-tab { grid-template-columns: 1fr; }
    .eesh-prev { position: static; }
}

/* copy feedback: instant state on the button + a small toast */
.eesh-btn.is-done { background: #34c759 !important; color: #04140a !important; }
.eesh-toast { position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); z-index: 100001; transform: translate(-50%, 12px); opacity: 0; padding: 12px 20px; border-radius: 22px; background: rgba(var(--ee-tint-rgb), .92); color: var(--ee-text-on-accent); font: 600 14px/1.2 var(--ees-font, -apple-system, sans-serif); box-shadow: 0 10px 30px rgba(0,0,0,.35); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); transition: opacity .15s ease, transform .15s ease; pointer-events: none; }
.eesh-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Tab actions + invitation mail (compose left, preview right) */
.eesh-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.eesh-root--mail { z-index: 100002; }
.eesh-dlg--mail { width: min(1040px, 100%); }
.eesh-mail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 14px; }
.eesh-mail__form { display: flex; flex-direction: column; gap: 12px; }
.eesh-mail__form input, .eesh-mail__form textarea { width: 100%; min-height: 44px; border: 0; outline: none; background: transparent; color: inherit; font: 500 15px/1.45 var(--ees-font); }
.eesh-fld--area { align-items: stretch; padding-top: 10px; padding-bottom: 10px; }
.eesh-mail__form textarea { resize: vertical; min-height: 220px; }
.eesh-mail__pv { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.eesh-mailpv { border-radius: 18px; background: var(--ee-bg-primary); color: var(--ee-text-primary); padding: 16px; max-height: 470px; overflow: auto; }
.eesh-mailpv__meta { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(var(--ee-ink-rgb), .08); font: 500 13px/1.3 var(--ees-font); color: var(--ee-text-tertiary); overflow-wrap: anywhere; }
.eesh-mailpv__meta b { color: var(--ee-text-primary); font-size: 15px; }
.eesh-mailpv__card { background: var(--ee-bg-elevated); border-radius: 14px; padding: 22px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.eesh-mailpv__card small { font: 700 11px/1 var(--ees-font); letter-spacing: .08em; text-transform: uppercase; color: #3ea04d; }
.eesh-mailpv__card h3 { margin: 8px 0 12px; font: 700 20px/1.2 var(--ees-font); }
.eesh-mailpv__card p { margin: 0 0 10px; font: 400 14px/1.5 var(--ees-font); white-space: pre-line; }
.eesh-mailpv__cta { display: inline-block; margin-top: 6px; padding: 11px 20px; border-radius: 22px; background: #0069b2; color: var(--ee-text-on-accent); font: 600 14px/1 var(--ees-font); }
.eesh-mailpv__att { margin-top: 14px; font: 500 12px/1.3 var(--ees-font); color: var(--ee-text-tertiary); }
@media (max-width: 820px) { .eesh-mail { grid-template-columns: 1fr; } }

/* Portal-Freigabe (P2, assets/js/ee-portal-grant.js, mockup p2-portal-freigabe) */
.eepg-dlg { width: min(1180px, 100%); }
.eepg-main { display: grid; gap: 12px; min-width: 0; }
.eepg-mode { margin: 0; }
.eepg-xp .eesh-pv { margin-bottom: 14px; }
.eepg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 14px; align-items: start; }
.eepg-form { border-radius: 24px; padding: 22px 24px; background: rgba(var(--ee-fg-rgb), .04); border: 1px solid var(--ees-border); }
.eepg-h { margin: 0 0 6px; font: 700 26px/1.15 var(--ees-font); letter-spacing: -.3px; color: var(--ees-text); }
.eepg-lead { margin: 0 0 6px; font: 500 13px/1.45 var(--ees-font); color: var(--ees-text-dim); }
.eepg-cols { margin-top: 4px; }
.eepg-stack { display: grid; gap: 8px; margin-top: 8px; }
.eepg-sel { flex: 1; min-width: 0; height: 40px; border: 0; background: none; outline: none; color: var(--ees-text); font: 500 14px/1 var(--ees-font); }
.eepg-sel option { color: #111; }
.eepg-segs { margin-top: 0; }
.eepg-acc { margin-top: 8px; }
.eepg-it { cursor: default; }
.eepg-lock { font: 600 11px/1 var(--ees-font); font-style: normal; color: #f5b13d; background: rgba(245,177,61,.12); border-radius: 8px; padding: 4px 8px; }
.eepg-foot { display: flex; align-items: center; gap: 16px; justify-content: space-between; margin-top: 18px; }
.eepg-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.eepg-side { border-radius: 24px; padding: 18px; background: rgba(var(--ee-fg-rgb), .04); border: 1px solid var(--ees-border); }
.eepg-side h4.eesh-lb { margin-top: 0; }
.eepg-rows { display: grid; }
.eepg-row { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--ees-border); }
.eepg-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--ees-font); color: #0b1a10; background: #34c759; }
.eepg-av--epc { background: #ffd60a; } .eepg-av--bank { background: #0a84ff; color: #fff; } .eepg-av--behoerde, .eepg-av--gemeinde { background: #ff9f0a; }
.eepg-who { display: grid; gap: 3px; min-width: 0; font: 500 13px/1.3 var(--ees-font); color: var(--ees-text); }
.eepg-who b { font-weight: 600; color: var(--ees-text-dim); }
.eepg-who small { color: var(--ees-text-faint); font-size: 12px; }
.eepg-use { color: var(--ees-text-dim); font-size: 12px; }
.eepg-use summary { cursor: pointer; }
.eepg-use span { display: block; padding: 2px 0 0 14px; color: var(--ees-text-faint); }
.eepg-kind { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; font: 600 10px/16px var(--ees-font); font-style: normal; letter-spacing: .02em; text-transform: uppercase; color: #34c759; background: rgba(52,199,89,.14); vertical-align: 1px; }
.eepg-kind--link { color: #0a84ff; background: rgba(10,132,255,.14); }
.eepg-av--lead { background: #0a84ff; color: #fff; }
.eepg-racts { display: flex; gap: 6px; margin-top: 6px; }
@media (max-width: 900px) { .eepg-grid, .eepg-cols { grid-template-columns: 1fr; } }

/* glass dropdown with search (Firma / Konto); shell tokens, so light and dark follow the system */
.eepg-cb { flex: 1; min-width: 0; height: 40px; border: 0; text-align: left; color: var(--ees-text); font: 500 14px/1 var(--ees-font); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 22px 0 0;
    background: linear-gradient(45deg, transparent 50%, currentColor 50%) calc(100% - 9px) 18px / 4px 4px no-repeat, linear-gradient(135deg, currentColor 50%, transparent 50%) calc(100% - 5px) 18px / 4px 4px no-repeat; }
.eepg-cb.is-ph { color: rgba(var(--ee-fg-rgb), .55); }
.eesh-fld { position: relative; }
.eepg-cb__pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; padding: 8px; border-radius: 14px; background: var(--ees-surface);
    -webkit-backdrop-filter: var(--ees-backdrop); backdrop-filter: var(--ees-backdrop); border: 1px solid var(--ees-glass-border); box-shadow: var(--ees-glass-shadow), 0 18px 40px rgba(0, 0, 0, .35); }
.eepg-cb__q { width: 100%; height: 34px; border-radius: 9px; border: 1px solid var(--ees-border); background: var(--ees-field); color: var(--ees-text); padding: 0 10px; font: 500 13px/1 var(--ees-font); outline: none; }
.eepg-cb__list { max-height: 260px; overflow-y: auto; margin-top: 6px; }
.eepg-cb__grp { padding: 8px 8px 4px; color: rgba(var(--ee-fg-rgb), .5); font: 600 10px/1.2 var(--ees-font); letter-spacing: .06em; text-transform: uppercase; }
.eepg-cb__opt { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ees-text); font: 500 13px/1.3 var(--ees-font); cursor: pointer; }
.eepg-cb__opt:hover, .eepg-cb__opt:focus-visible { background: rgba(var(--ee-fg-rgb), .08); outline: none; }
.eepg-cb__opt.is-on { background: rgba(48, 209, 88, .22); }
.eepg-cb__opt.is-clear, .eepg-cb__none { color: rgba(var(--ee-fg-rgb), .55); }
.eepg-cb__opt.is-more { margin-top: 6px; color: rgba(var(--ee-fg-rgb), .7); border-top: 1px solid rgba(var(--ee-fg-rgb), .1); border-radius: 0 0 8px 8px; }
.eepg-cb__none { padding: 10px; font-size: 13px; }
/* one "Projekt teilen" flow (02.11.2026): who chips, plant hero, customer parts */
.eepg-wholb { margin-top: 0; }
.eepg-pv { background-size: cover; background-position: center; }
.eepg-pv small { color: rgba(255, 255, 255, .78); }
.eepg-on { font: 600 11px/1 var(--ees-font); font-style: normal; color: #34c759; background: rgba(52,199,89,.14); border-radius: 8px; padding: 4px 8px; }
.eepg-sub { display: block; margin-top: 3px; font: 500 12px/1.3 var(--ees-font); color: var(--ees-text-faint); }
label.eepg-it:has(input) { cursor: pointer; }
.eepg-foot .eesh-btn--go { min-width: 120px; }

/* "Verwalten" of a live grant: who it is (fixed), then the same toggles; the change history in the row */
.eepg-editwho { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: rgba(var(--ee-fg-rgb), .06); }
.eepg-editwho small { color: var(--ee-text-secondary, #86868b); font-size: 12px; }
.eepg-hist summary { color: var(--ee-text-secondary, #86868b); }
.eepg-racts .eesh-btn.is-on { background: rgba(48, 209, 88, .18); }
