.dev-layout-body {
    background:
        radial-gradient(circle at top right, rgba(244, 179, 58, 0.12), transparent 28%),
        radial-gradient(circle at top left, rgba(233, 122, 117, 0.16), transparent 26%),
        linear-gradient(180deg, #fff7f2 0%, #fffdfb 40%, #f6f3ff 100%);
    color: #2f2f6f;
    min-height: 100vh;
}

.dev-layout-frame {
    margin: 0 auto;
    max-width: 1520px;
    padding: 1rem 1rem 2rem;
}

/* Iframe-embedded pages (e.g. the public referral form) — blend into the host
   page instead of painting our own background/frame. */
.dev-layout-body-transparent {
    background: none;
    min-height: 0;
}

.dev-layout-frame-embed {
    padding: 0;
}

.dev-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding-bottom: 1rem;
    padding-top: 0.25rem;
}

.dev-topbar-card {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(47, 47, 111, 0.08);
    border-radius: 30px;
    box-shadow: 0 20px 48px rgba(47, 47, 111, 0.08);
    padding: 0.9rem 1rem;
}

.dev-brand {
    align-items: center;
    color: #2f2f6f;
    display: inline-flex;
    gap: 0.85rem;
    min-width: 0;
    text-decoration: none;
}

.dev-brand:hover {
    color: #2f2f6f;
}

.dev-brand img {
    height: 64px;
    object-fit: contain;
    width: auto;
}

.dev-brand strong {
    display: block;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.dev-nav-grid {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 1rem;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
}

.dev-nav-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 0 1.25rem;
}

.dev-nav-link,
.dev-nav-link:link,
.dev-nav-link:visited {
    border-radius: 999px;
    color: #726b8e;
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.65rem 0.95rem;
    text-decoration: none;
    transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.dev-nav-link:hover,
.dev-nav-link:focus {
    background: rgba(233, 122, 117, 0.08);
    color: #2f2f6f;
}

.dev-nav-link.is-active {
    background: #2f2f6f;
    box-shadow: 0 10px 22px rgba(47, 47, 111, 0.18);
    color: #fffdf8;
}

.dev-topbar-actions {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 0.75rem;
}

.dev-user-pill {
    align-items: center;
    background: #eadff2;
    border-radius: 20px;
    color: #2f2f6f;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-height: 52px;
    min-width: 180px;
    padding: 0.55rem 0.9rem;
    text-decoration: none;
}

.dev-user-pill:hover,
.dev-user-pill:focus {
    color: #2f2f6f;
}

.dev-user-pill strong {
    font-size: 0.92rem;
    max-width: 18ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dev-dropdown-menu {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(47, 47, 111, 0.08);
    border-radius: 20px;
    box-shadow: 0 18px 42px rgba(47, 47, 111, 0.10);
    padding: 0.5rem;
}

.dev-dropdown-menu .dropdown-item {
    border-radius: 12px;
    color: #726b8e;
    font-weight: 600;
    padding: 0.55rem 0.8rem;
}

.dev-dropdown-menu .dropdown-item:hover,
.dev-dropdown-menu .dropdown-item:focus {
    background: rgba(233, 122, 117, 0.08);
    color: #2f2f6f;
}

.dev-nav-toggle {
    border: 1px solid rgba(47, 47, 111, 0.12);
    border-radius: 18px;
    padding: 0.55rem 0.7rem;
}

.dev-main {
    min-height: calc(100vh - 160px);
}

@media (max-width: 1199.98px) {
    .dev-topbar-card {
        padding: 0.85rem;
    }

    .dev-nav-grid {
        align-items: stretch;
        flex-direction: column;
        padding-top: 0.9rem;
    }

    .dev-nav-list {
        margin-left: 0;
    }

    .dev-topbar-actions {
        flex-wrap: wrap;
        justify-content: space-between;
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .dev-layout-frame {
        padding: 0.75rem 0.75rem 1.5rem;
    }

    .dev-brand strong {
        font-size: 0.95rem;
    }

    .dev-nav-list {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .dev-nav-link {
        justify-content: center;
        width: 100%;
    }

    .dev-topbar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dev-user-pill {
        width: 100%;
    }
}
