/* Ezymix Core — installer warranty portal (uses theme tokens with fallbacks) */
.em-portal { --p-green: var(--em-green, #058753); --p-green-dark: var(--em-green-dark, #046b42); --p-black: var(--em-black, #111); --p-cream: var(--em-cream, #f5f0eb); --p-grey: var(--em-warm-grey, #e8e2d9); --p-mid: var(--em-mid-grey, #9a9590); --p-dark: var(--em-dark-grey, #3d3a36); --p-line: var(--em-line, rgba(17,17,17,.1)); --p-display: var(--em-font-display, "Barlow Condensed", "Arial Narrow", Arial, sans-serif); margin: 0 0 24px; scroll-margin-top: 130px; }
.em-portal *, .em-portal *::before, .em-portal *::after { box-sizing: border-box; }
.em-portal .em-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--p-green); margin-bottom: 6px; }
.em-portal .em-portal__h, .em-portal h2.em-portal__h { font-family: var(--p-display); font-weight: 800; text-transform: uppercase; line-height: 1.02; font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0 0 .4em; color: var(--p-black); padding: 0; border: 0; }
.em-portal .em-portal__h--big { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.em-portal .em-portal__h3, .em-portal h3.em-portal__h3 { font-family: var(--p-display); font-weight: 800; text-transform: uppercase; font-size: 1.25rem; margin: 0 0 12px; color: var(--p-black); }
.em-portal__panel { background: #fff; border: 1px solid var(--p-line); border-top: 4px solid var(--p-green); padding: clamp(20px, 3vw, 32px); margin: 0 0 24px; }
.em-portal__panel--center { max-width: 520px; margin-left: auto; margin-right: auto; }
.em-portal__panel p:last-child { margin-bottom: 0; }
.em-portal__lead { color: var(--p-dark); margin: 0 0 20px; }
.em-portal__fine { font-size: .9rem; color: var(--p-dark); }
.em-portal__links { font-size: .92rem; margin: 18px 0 0; color: var(--p-dark); }
.em-portal__back { font-weight: 600; color: var(--p-black); text-decoration: underline; text-underline-offset: 3px; }
.em-portal__back:hover { color: var(--p-green); }

/* Login layout */
.em-portal__auth { display: grid; gap: 32px; align-items: start; }
@media (min-width: 860px) { .em-portal__auth { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.em-portal__intro { color: var(--p-dark); font-size: 1.05rem; }
.em-portal ol.em-portal__how { list-style: none; counter-reset: how; margin: 24px 0 0; padding: 0; }
.em-portal ol.em-portal__how li { counter-increment: how; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px solid var(--p-line); color: var(--p-dark); }
.em-portal ol.em-portal__how li::before { content: counter(how); position: absolute; left: 0; top: 9px; width: 30px; height: 30px; background: var(--p-black); color: #fff; font-family: var(--p-display); font-weight: 800; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.em-portal__how strong { color: var(--p-black); }

/* Bar */
.em-portal__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 0 0 18px; margin: 0 0 24px; border-bottom: 2px solid var(--p-black); }
.em-portal__who strong { display: block; font-family: var(--p-display); font-weight: 800; text-transform: uppercase; font-size: 1.4rem; line-height: 1; }
.em-portal__who .em-eyebrow { margin-bottom: 2px; }
.em-portal__co { font-size: .9rem; color: var(--p-dark); }
.em-portal__nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; font-weight: 600; }
.em-portal__nav a { color: var(--p-black); padding: 6px 0; border-bottom: 2px solid transparent; }
.em-portal__nav a:hover, .em-portal__nav a[aria-current] { border-color: var(--p-green); color: var(--p-black); }
.em-portal__nav-new { color: var(--p-green) !important; }
.em-portal__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 0 0 18px; }
.em-portal__head .em-portal__h { margin-bottom: 0; }
.em-portal__note { background: #fff6e5; border-left: 4px solid #dba617; padding: 14px 18px; margin: 0 0 18px; }
.em-portal__note--info { background: #fff; border-color: var(--p-mid); }
.em-portal__note--ok { background: #eef8f2; border-color: var(--p-green); }
.em-portal__empty p { max-width: 60ch; }

/* Badges */
.em-badge { display: inline-block; padding: 4px 10px; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--p-grey); color: var(--p-black); white-space: nowrap; }
.em-badge--approved { background: var(--p-green); color: #fff; }
.em-badge--submitted { background: #dba617; color: #111; }
.em-badge--rejected { background: #c0392b; color: #fff; }

/* Dashboard list */
.em-portal__list { display: grid; gap: 10px; }
.em-portal a.em-portal__item { text-decoration: none; }
.em-portal__item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; background: #fff; border: 1px solid var(--p-line); border-left: 4px solid var(--p-green); padding: 16px 20px; color: var(--p-black); transition: transform .2s, box-shadow .2s; }
.em-portal__item:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(17,17,17,.08); color: var(--p-black); }
.em-portal__item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.em-portal__ref { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--p-green); }
.em-portal__item-title { font-family: var(--p-display); font-weight: 800; text-transform: uppercase; font-size: 1.3rem; line-height: 1.05; }
.em-portal__item-sub { font-size: .9rem; color: var(--p-dark); }
.em-portal__item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: .85rem; color: var(--p-dark); }
.em-portal__item-action { font-weight: 700; color: var(--p-black); }

/* Stepper */
.em-portal ol.em-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.em-steps__item a, .em-steps__item > span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--p-grey); color: var(--p-dark); font-weight: 600; font-size: .9rem; line-height: 1.15; }
.em-steps__item.is-current a, .em-steps__item.is-current > span { background: var(--p-black); color: #fff; }
.em-steps__item.is-done a { background: var(--p-green); color: #fff; }
.em-steps__n { flex: 0 0 auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,.12); font-family: var(--p-display); font-weight: 800; font-size: .95rem; }
.em-steps__item.is-current .em-steps__n, .em-steps__item.is-done .em-steps__n { background: rgba(255,255,255,.22); }
@media (max-width: 600px) { .em-steps__label { display: none; } .em-steps__item a, .em-steps__item > span { justify-content: center; } }

/* Forms */
.em-portal__form .em-form__grid--2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.em-portal__form .em-form__grid--cols { display: grid; gap: 16px; grid-template-columns: repeat(6, 1fr); }
.em-portal__form .em-field--full { grid-column: span 6; }
.em-portal__form .em-field--half { grid-column: span 3; }
.em-portal__form .em-field--third { grid-column: span 2; }
@media (max-width: 680px) { .em-portal__form .em-field--half, .em-portal__form .em-field--third { grid-column: span 6; } }
.em-portal .em-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.em-portal .em-field__label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--p-dark); }
.em-portal .em-field__label span { color: var(--p-green); }
.em-portal .em-field__input { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid rgba(17,17,17,.25); background: #fff; color: var(--p-black); border-radius: 0; -webkit-appearance: none; appearance: none; }
.em-portal select.em-field__input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.em-portal .em-field__input:focus { outline: none; border-color: var(--p-green); box-shadow: 0 0 0 3px rgba(5,135,83,.14); }
.em-portal .em-field.has-error .em-field__input { border-color: #c0392b; }
.em-portal .em-field__help { font-size: .8rem; color: var(--p-mid); }
.em-portal .em-field__error { font-size: .82rem; color: #8e2a1f; font-weight: 600; }
.em-portal .em-field__fixed { padding: 12px 14px; background: var(--p-cream); border: 1px solid var(--p-line); font-weight: 600; }
.em-portal .em-form__actions { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.em-portal .em-form__actions--split { justify-content: space-between; }
.em-portal .em-form__status { margin-bottom: 18px; }
.em-portal .em-form__status p { margin: 0; }
.em-check { display: inline-flex; align-items: flex-start; gap: 10px; font-size: .95rem; color: var(--p-dark); cursor: pointer; }
.em-check input { margin: 4px 0 0; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--p-green); }
.em-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.em-check--tile { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid rgba(17,17,17,.25); padding: 10px 12px; font-size: .92rem; color: var(--p-black); }
.em-check--tile:hover { border-color: var(--p-green); }
.em-check--tile input { margin: 0; }
.em-check--tile:has(input:checked) { border-color: var(--p-green); background: #eef8f2; }
.em-check--block { display: flex; background: var(--p-cream); padding: 14px 16px; border-left: 4px solid var(--p-green); margin: 0 0 14px; }
.em-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.em-portal .em-button[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* Photo stages */
.em-stage { border: 1px solid var(--p-line); padding: 16px 18px 12px; margin: 0 0 14px; min-width: 0; }
.em-stage.is-missing { border-color: #c0392b; }
.em-stage__legend { font-family: var(--p-display); font-weight: 800; text-transform: uppercase; font-size: 1.15rem; padding: 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.em-stage__n { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; background: var(--p-green); color: #fff; font-size: .9rem; font-family: var(--p-display); font-weight: 800; }
.em-stage__req, .em-stage__opt { font-family: inherit; font-size: .62rem; letter-spacing: .1em; padding: 3px 7px; background: var(--p-black); color: #fff; }
.em-stage__opt { background: var(--p-grey); color: var(--p-dark); }
.em-stage__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.em-stage__photo { position: relative; margin: 0; aspect-ratio: 1; background: var(--p-cream); border: 1px solid var(--p-line); overflow: hidden; }
.em-stage__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.em-stage__photo.is-uploading img { opacity: .4; }
.em-stage__photo.is-uploading::after { content: attr(data-progress); position: absolute; inset: auto 0 0; background: rgba(17,17,17,.75); color: #fff; font-size: .72rem; text-align: center; padding: 4px; }
.em-stage__photo.is-error { border-color: #c0392b; }
.em-stage__photo.is-error::after { content: attr(data-progress); position: absolute; inset: auto 0 0; background: #c0392b; color: #fff; font-size: .7rem; text-align: center; padding: 4px; }
.em-stage__remove { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(17,17,17,.8); color: #fff; font-size: 18px; line-height: 26px; padding: 0; text-align: center; }
.em-stage__remove:hover { background: #c0392b; }
.em-stage__add { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 1; border: 2px dashed rgba(5,135,83,.45); background: #fff; color: var(--p-green); cursor: pointer; font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; transition: background .2s, border-color .2s; }
.em-stage__add:hover, .em-stage__add.is-drag { background: #eef8f2; border-color: var(--p-green); }
.em-stage__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.em-stage__add-icon { font-size: 2rem; line-height: 1; font-family: var(--p-display); }
.em-stage__status { margin: 8px 0 0; font-size: .82rem; color: var(--p-dark); min-height: 1em; }
.em-stage__status.is-error { color: #8e2a1f; font-weight: 600; }

/* Review */
.em-review__block { margin: 0 0 26px; }
.em-review__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.em-review__head a { font-size: .85rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.em-portal table.em-summary { display: table; width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0; background: transparent; border: 0; }
.em-portal table.em-summary tbody { display: table-row-group; width: auto; }
.em-portal table.em-summary tr { background: transparent; }
.em-portal table.em-summary tr:nth-child(even) td { background: transparent; }
.em-portal table.em-summary th, .em-portal table.em-summary td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border: 0; border-bottom: 1px solid var(--p-line); background: transparent; color: var(--p-black); font-family: inherit; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: inherit; }
.em-portal table.em-summary th { width: 36%; color: var(--p-dark); font-weight: 600; }
.em-summary__missing { color: #8e2a1f; font-weight: 700; }
.em-photo-summary__stage { padding: 10px 0; border-bottom: 1px solid var(--p-line); }
.em-photo-summary__stage.is-missing .em-photo-summary__count { color: #8e2a1f; }
.em-portal .em-photo-summary__h { font-family: inherit; font-size: .95rem; font-weight: 600; text-transform: none; display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--p-black); }
.em-photo-summary__count { margin-left: auto; font-size: .82rem; color: var(--p-dark); font-weight: 500; }
.em-photo-summary__grid { display: flex; flex-wrap: wrap; gap: 6px; }
.em-photo-summary__grid a { display: block; width: 72px; height: 72px; border: 1px solid var(--p-line); overflow: hidden; }
.em-photo-summary__grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.em-portal__done .em-button { margin-right: 8px; }
