:root {
    --dwl-pwa-brand: var(--dwl-ui-brand, #087a55);
    --dwl-pwa-brand-dark: var(--dwl-ui-brand-dark, #065c41);
    --dwl-pwa-ink: var(--dwl-ui-ink, #102238);
    --dwl-pwa-cream: #f4f1e8;
    --dwl-pwa-line: #dce5df;
    --dwl-pwa-shadow: 0 24px 70px rgba(16, 34, 56, .12);
}

.dwl-pwa-page {
    width: min(1240px, calc(100% - 32px));
    margin: 38px auto 72px;
    color: var(--dwl-pwa-ink);
}

.dwl-pwa-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: clamp(32px, 6vw, 86px);
    align-items: center;
    padding: clamp(32px, 6vw, 76px);
    border-radius: 30px;
    background: linear-gradient(135deg, #0d2d3d 0%, #123f4e 55%, #087a55 100%);
    color: #fff;
    overflow: hidden;
    box-shadow: var(--dwl-pwa-shadow);
}

.dwl-pwa-kicker,
.dwl-pwa-section-head > span,
.dwl-pwa-signin-card > div > span {
    display: block;
    margin-bottom: 10px;
    color: #90e3c4;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.dwl-pwa-hero h1 {
    max-width: 760px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -.04em;
}

.dwl-pwa-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255,255,255,.84);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.7;
}

.dwl-pwa-role-switch {
    display: inline-flex;
    gap: 6px;
    margin-top: 28px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}

.dwl-pwa-role-switch a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.dwl-pwa-role-switch a.is-active {
    background: #fff;
    color: var(--dwl-pwa-brand-dark);
}

.dwl-pwa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.dwl-pwa-install-button,
.dwl-pwa-open-button,
.dwl-pwa-save-button,
.dwl-pwa-offline button,
.dwl-pwa-signin-card > a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--dwl-pwa-brand);
    color: #fff;
    font: inherit;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.dwl-pwa-hero .dwl-pwa-install-button {
    background: #fff;
    color: var(--dwl-pwa-brand-dark);
}

.dwl-pwa-hero .dwl-pwa-open-button {
    border-color: rgba(255,255,255,.35);
    background: transparent;
    color: #fff;
}

.dwl-pwa-install-button:hover,
.dwl-pwa-save-button:hover,
.dwl-pwa-offline button:hover,
.dwl-pwa-signin-card > a:hover {
    background: var(--dwl-pwa-brand-dark);
    color: #fff;
}

.dwl-pwa-hero .dwl-pwa-install-button:hover {
    background: #e8fff6;
    color: var(--dwl-pwa-brand-dark);
}

.dwl-pwa-install-button[hidden] { display: none !important; }
.dwl-pwa-install-button:disabled,
.dwl-pwa-save-button:disabled { opacity: .65; cursor: wait; }

.dwl-pwa-status,
.dwl-pwa-form-status {
    min-height: 24px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 700;
}

.dwl-pwa-status.is-success,
.dwl-pwa-form-status.is-success { color: #8ff0c7; }
.dwl-installer-panel .dwl-pwa-status.is-success,
.dwl-pwa-preferences .dwl-pwa-form-status.is-success { color: var(--dwl-pwa-brand-dark); }
.dwl-pwa-status.is-warning { color: #ffe2a4; }

.dwl-pwa-device-card {
    width: min(330px, 100%);
    margin-inline: auto;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 38px;
    background: rgba(255,255,255,.12);
    box-shadow: 0 32px 80px rgba(0,0,0,.24);
    transform: rotate(3deg);
}

.dwl-pwa-device-top {
    width: 110px;
    height: 20px;
    margin: 0 auto -7px;
    position: relative;
    z-index: 2;
    border-radius: 0 0 16px 16px;
    background: #071821;
}

.dwl-pwa-device-screen {
    min-height: 470px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    border-radius: 28px;
    background: linear-gradient(180deg, #fff 0%, #edf7f2 100%);
    color: var(--dwl-pwa-ink);
    text-align: center;
}

.dwl-pwa-device-screen img { margin-bottom: 20px; }
.dwl-pwa-device-screen strong { font-size: 25px; }
.dwl-pwa-device-screen > span { margin-top: 6px; color: #58706b; }
.dwl-pwa-device-lines { width: 100%; margin-top: 34px; }
.dwl-pwa-device-lines i { display: block; height: 58px; margin: 10px 0; border-radius: 12px; background: #fff; box-shadow: 0 8px 20px rgba(16,34,56,.08); }

.dwl-pwa-section {
    margin-top: 28px;
    padding: clamp(26px, 5vw, 56px);
    border: 1px solid var(--dwl-pwa-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(16,34,56,.06);
}

.dwl-pwa-section-head { max-width: 780px; margin-bottom: 28px; }
.dwl-pwa-section-head > span { color: var(--dwl-pwa-brand); }
.dwl-pwa-section-head h2 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 44px); line-height: 1.08; letter-spacing: -.025em; }
.dwl-pwa-section-head p { margin: 0; color: #58706b; line-height: 1.7; }

.dwl-pwa-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dwl-pwa-benefits article {
    min-height: 145px;
    padding: 22px;
    border-radius: 16px;
    background: var(--dwl-pwa-cream);
}

.dwl-pwa-benefits article > span {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--dwl-pwa-brand);
    color: #fff;
    font-weight: 900;
}

.dwl-pwa-benefits p { margin: 14px 0 0; font-weight: 700; line-height: 1.5; }

.dwl-pwa-instruction-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.dwl-pwa-instruction-grid article {
    position: relative;
    padding: 24px;
    border: 1px solid var(--dwl-pwa-line);
    border-radius: 16px;
}

.dwl-pwa-instruction-grid article.is-current { border-color: var(--dwl-pwa-brand); box-shadow: inset 0 0 0 1px var(--dwl-pwa-brand); }
.dwl-pwa-instruction-grid strong { color: var(--dwl-pwa-brand); font-size: 13px; letter-spacing: .08em; }
.dwl-pwa-instruction-grid h3 { margin: 12px 0 8px; font-size: 20px; }
.dwl-pwa-instruction-grid p { margin: 0; color: #58706b; line-height: 1.65; }

.dwl-pwa-signin-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 28px;
    padding: 30px;
    border-radius: 20px;
    background: #102e3d;
    color: #fff;
}
.dwl-pwa-signin-card h2 { margin: 0 0 8px; color: #fff; }
.dwl-pwa-signin-card p { max-width: 760px; margin: 0; color: rgba(255,255,255,.8); }

.dwl-pwa-preference-table {
    overflow: hidden;
    border: 1px solid var(--dwl-pwa-line);
    border-radius: 14px;
}

.dwl-pwa-preference-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, 90px);
    align-items: center;
    min-height: 58px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--dwl-pwa-line);
}
.dwl-pwa-preference-row:last-child { border-bottom: 0; }
.dwl-pwa-preference-row.is-head { background: #eff5f1; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.dwl-pwa-preference-row > span:not(:first-child),
.dwl-pwa-preference-row > label { text-align: center; }
.dwl-pwa-preference-row input { width: 20px; height: 20px; accent-color: var(--dwl-pwa-brand); }
.dwl-pwa-save-button { margin-top: 18px; }

.dwl-pwa-update-banner {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: min(440px, calc(100vw - 36px));
    padding: 14px 16px;
    border-radius: 14px;
    background: #102e3d;
    color: #fff;
    box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.dwl-pwa-update-banner span { font-weight: 700; }
.dwl-pwa-update-banner button { flex: 0 0 auto; padding: 9px 12px; border: 0; border-radius: 8px; background: #fff; color: #102e3d; font-weight: 800; cursor: pointer; }

.dwl-pwa-offline {
    width: min(620px, calc(100% - 32px));
    margin: clamp(60px, 12vh, 130px) auto;
    padding: clamp(32px, 7vw, 68px);
    border: 1px solid var(--dwl-pwa-line);
    border-radius: 26px;
    background: #fff;
    color: var(--dwl-pwa-ink);
    text-align: center;
    box-shadow: var(--dwl-pwa-shadow);
}
.dwl-pwa-offline > span { display: block; margin-top: 16px; color: var(--dwl-pwa-brand); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.dwl-pwa-offline h1 { margin: 10px 0 14px; font-size: clamp(34px, 7vw, 52px); }
.dwl-pwa-offline p { margin: 0 auto 24px; color: #58706b; line-height: 1.7; }

.dwl-pwa-portal-panel .dwl-pwa-kicker { color: var(--dwl-pwa-brand); }
.dwl-pwa-portal-panel .dwl-pwa-actions { margin-top: 20px; }
.dwl-pwa-portal-panel .dwl-pwa-open-button { border-color: var(--dwl-pwa-line); background: #fff; color: var(--dwl-pwa-ink); }

.dwl-pwa-standalone body,
body.dwl-pwa-standalone { padding-bottom: env(safe-area-inset-bottom); }

@media (display-mode: standalone) {
    .dwl-pwa-enabled .site-header { padding-top: env(safe-area-inset-top); }
    .dwl-pwa-enabled .dwl-installer-shell { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 980px) {
    .dwl-pwa-hero { grid-template-columns: 1fr; }
    .dwl-pwa-device-card { display: none; }
    .dwl-pwa-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .dwl-pwa-page { width: min(100% - 20px, 1240px); margin-top: 10px; }
    .dwl-pwa-hero { padding: 28px 22px; border-radius: 20px; }
    .dwl-pwa-hero h1 { font-size: clamp(36px, 12vw, 52px); }
    .dwl-pwa-role-switch { width: 100%; display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; }
    .dwl-pwa-role-switch a { text-align: center; border-radius: 9px; }
    .dwl-pwa-actions > * { width: 100%; }
    .dwl-pwa-section { padding: 24px 18px; border-radius: 18px; }
    .dwl-pwa-benefits,
    .dwl-pwa-instruction-grid { grid-template-columns: 1fr; }
    .dwl-pwa-benefits article { min-height: 0; }
    .dwl-pwa-signin-card { align-items: stretch; flex-direction: column; padding: 24px 20px; }
    .dwl-pwa-preference-table { overflow-x: auto; }
    .dwl-pwa-preference-row { min-width: 610px; grid-template-columns: minmax(220px, 1fr) repeat(3, 90px); }
    .dwl-pwa-update-banner { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); justify-content: space-between; }

    html.dwl-pwa-standalone .dwl-installer-nav,
    body.dwl-pwa-standalone .dwl-installer-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9995;
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        margin: 0;
        padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
        overflow-x: auto;
        border-top: 1px solid var(--dwl-pwa-line);
        background: rgba(255,255,255,.97);
        box-shadow: 0 -10px 30px rgba(16,34,56,.12);
        backdrop-filter: blur(16px);
        -webkit-overflow-scrolling: touch;
    }
    html.dwl-pwa-standalone .dwl-installer-nav a,
    body.dwl-pwa-standalone .dwl-installer-nav a {
        flex: 0 0 auto;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 9px 13px;
        border-radius: 10px;
        white-space: nowrap;
    }
    html.dwl-pwa-standalone .dwl-installer-nav > span,
    body.dwl-pwa-standalone .dwl-installer-nav > span { display: none; }
}

/* Stages 6 and 7 app invitations */
.dwl-app-invitation-banner,
.dwl-app-invitation-confirmation {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    margin:0 0 24px;
    padding:24px;
    border:1px solid #b9ddcf;
    border-radius:18px;
    background:linear-gradient(135deg,#eaf7f2 0%,#fff 75%);
    box-shadow:0 12px 30px rgba(16,34,56,.08);
}
.dwl-app-invitation-banner > div,
.dwl-app-invitation-confirmation > div {min-width:0;}
.dwl-app-invitation-banner span,
.dwl-app-invitation-confirmation > span {
    display:block;
    margin:0 0 5px;
    color:#087a55;
    font-size:12px;
    font-weight:800;
    letter-spacing:1.1px;
    text-transform:uppercase;
}
.dwl-app-invitation-banner h2,
.dwl-app-invitation-confirmation h3 {margin:0 0 8px;color:#102238;line-height:1.2;}
.dwl-app-invitation-banner p,
.dwl-app-invitation-confirmation p {margin:0;color:#43576b;line-height:1.65;}
.dwl-app-invitation-confirmation {display:block;text-align:left;}
.dwl-app-invitation-confirmation .dwl-button {margin-top:16px;}
.dwl-notification-list {display:grid;gap:14px;margin-top:20px;}
.dwl-notification-list article {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:18px;
    border:1px solid #dce5e1;
    border-radius:14px;
    background:#fff;
}
.dwl-notification-list article span {font-size:12px;color:#708092;}
.dwl-notification-list article h3 {margin:4px 0 6px;color:#102238;}
.dwl-notification-list article p {margin:0;color:#516477;line-height:1.55;}
@media (max-width:760px) {
    .dwl-app-invitation-banner,
    .dwl-notification-list article {align-items:stretch;flex-direction:column;}
    .dwl-app-invitation-banner .dwl-installer-button,
    .dwl-notification-list .dwl-installer-button {width:100%;text-align:center;}
}
