body.eco-app .shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.25rem;
}

body.eco-app .sidebar {
    position: sticky;
    top: 1.25rem;
    width: auto;
    max-height: calc(100vh - 2.5rem);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--eco-radius-lg);
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 34%),
        linear-gradient(180deg, #1b5e20 0%, #2e7d32 52%, #388e3c 100%);
    box-shadow: var(--eco-shadow-lg);
    transform: none;
}

body.eco-app .sidebar .brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    padding: 0.4rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
}

body.eco-app .brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.5rem;
}

body.eco-app .sidebar nav {
    gap: 0.65rem;
}

body.eco-app .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 58px;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    font-weight: 700;
    transition: transform var(--eco-transition-fast), background var(--eco-transition-fast), box-shadow var(--eco-transition-fast);
}

body.eco-app .nav-link::before {
    content: "";
    position: absolute;
    left: 0.75rem;
    top: 50%;
    width: 4px;
    height: 0;
    border-radius: 999px;
    background: var(--eco-coin);
    transform: translateY(-50%);
    transition: height var(--eco-transition-fast);
}

body.eco-app .nav-link:hover,
body.eco-app .nav-link.active {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateX(3px);
}

body.eco-app .nav-link:hover::before,
body.eco-app .nav-link.active::before {
    height: 65%;
}

body.eco-app .nav-link-icon,
body.eco-app .section-menu-link-icon,
body.eco-app .topbar-shortcut-icon {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

body.eco-app .nav-link-icon {
    overflow: hidden;
}

body.eco-app .nav-link-icon-image {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

body.eco-app .shell-main {
    min-width: 0;
}

body.eco-app .topbar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: var(--eco-radius-md);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--eco-shadow-sm);
    backdrop-filter: blur(18px);
}

body.eco-app .topbar-user {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

body.eco-app .topbar-user-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
}

body.eco-app .topbar-avatar {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--eco-secondary), var(--eco-mission));
    color: #fff;
    font-weight: 900;
    box-shadow: var(--eco-shadow-sm);
}

body.eco-app .topbar-user-line strong {
    min-width: 0;
    font-size: 1.02rem;
    line-height: 1.15;
}

body.eco-app .topbar-logout-form {
    margin-left: auto;
}

body.eco-app .topbar-logout-form .btn {
    min-width: 108px;
}

body.eco-app .topbar-meta,
body.eco-app .topbar-actions,
body.eco-app .topbar-shortcuts {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

body.eco-app .topbar-actions {
    margin-left: auto;
    justify-content: flex-end;
}

body.eco-app .topbar-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(46, 125, 50, 0.12);
    color: var(--eco-text);
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}

body.eco-app .topbar-chip-soft {
    background: rgba(66, 165, 245, 0.14);
}

body.eco-app .topbar-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 42px;
    padding: 0.45rem 0.8rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(183, 215, 184, 0.85);
    color: var(--eco-text);
    font-size: 0.92rem;
    font-weight: 800;
    transition: transform var(--eco-transition-fast), box-shadow var(--eco-transition-fast), border-color var(--eco-transition-fast);
}

body.eco-app .topbar-shortcut:hover {
    transform: translateY(-2px);
    border-color: rgba(46, 125, 50, 0.3);
    box-shadow: var(--eco-shadow-sm);
}

body.eco-app .topbar-shortcut-icon {
    background: linear-gradient(135deg, var(--eco-primary), var(--eco-primary-soft));
}

body.eco-app .section-menu {
    gap: 0.9rem;
    margin-bottom: 1.2rem;
    padding: 0.25rem;
}

body.eco-app .section-menu-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(183, 215, 184, 0.9);
    color: var(--eco-text-soft);
    box-shadow: 0 8px 18px rgba(46, 125, 50, 0.08);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

body.eco-app .section-menu-link:hover,
body.eco-app .section-menu-link.active {
    background: linear-gradient(135deg, var(--eco-primary), var(--eco-primary-soft));
    color: #fff;
    box-shadow: 0 16px 28px rgba(46, 125, 50, 0.2);
}

body.eco-app .content {
    padding: 0.25rem 0 2rem;
}

body.eco-app .content > * + * {
    margin-top: 1rem;
}

body.eco-guest .guest-shell {
    position: relative;
    overflow: hidden;
    padding: 1.4rem;
}

body.eco-guest .guest-shell::before,
body.eco-guest .guest-shell::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(4px);
}

body.eco-guest .guest-shell::before {
    top: 6%;
    left: 10%;
    width: 180px;
    height: 180px;
}

body.eco-guest .guest-shell::after {
    right: 8%;
    bottom: 10%;
    width: 240px;
    height: 240px;
}

body.eco-app .nav-toggle {
    display: none;
}

body.eco-app .overlay {
    display: none;
}

@media (max-width: 1180px) {
    body.eco-app .shell {
        grid-template-columns: 1fr;
    }

    body.eco-app .sidebar {
        position: fixed;
        inset: 1rem auto 1rem 1rem;
        width: min(88vw, 320px);
        transform: translateX(-120%);
        z-index: 70;
    }

    body.eco-app .sidebar.open {
        transform: translateX(0);
    }

    body.eco-app .overlay {
        display: block;
    }

    body.eco-app .nav-toggle {
        display: inline-flex;
    }
}

@media (max-width: 860px) {
    body.eco-app .topbar {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: start;
        gap: 0.85rem;
        padding: 0.9rem 1rem;
    }

    body.eco-app .nav-toggle {
        align-self: start;
        min-width: 0;
        height: 46px;
        padding: 0 0.9rem;
        border-radius: 16px;
        font-size: 0.94rem;
        font-weight: 800;
        box-shadow: 0 10px 20px rgba(46, 125, 50, 0.12);
    }

    body.eco-app .topbar-user {
        gap: 0.6rem;
        min-width: 0;
    }

    body.eco-app .topbar-meta {
        min-width: 0;
    }

    body.eco-app .topbar-chip {
        width: 100%;
        min-height: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        color: var(--eco-primary-hover);
        font-size: 1.12rem;
        line-height: 1.2;
        letter-spacing: 0.01em;
        justify-content: flex-start;
        white-space: normal;
        overflow-wrap: anywhere;
        box-shadow: none;
    }

    body.eco-app .topbar-user-line {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        column-gap: 0.75rem;
        row-gap: 0.2rem;
        padding: 0.7rem 0.85rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.84);
        border: 1px solid rgba(183, 215, 184, 0.9);
        box-shadow: 0 10px 22px rgba(46, 125, 50, 0.1);
    }

    body.eco-app .topbar-user-line .topbar-avatar {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 18px;
        flex: 0 0 auto;
    }

    body.eco-app .topbar-user-line .badge {
        order: 3;
        margin: 0;
        padding: 0.18rem 0.6rem;
        font-size: 0.72rem;
        line-height: 1.1;
    }

    body.eco-app .topbar-user-line strong {
        order: 2;
        display: block;
        flex: 1 1 120px;
        min-width: 0;
        font-size: 1rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    body.eco-app .topbar-logout-form {
        margin-left: 0;
        align-self: stretch;
    }

    body.eco-app .topbar-logout-form .btn {
        min-width: 92px;
        min-height: 100%;
        padding-inline: 0.9rem;
    }
}

@media (max-width: 640px) {
    body.eco-app .topbar {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "toggle action"
            "user user";
        gap: 0.75rem;
        padding: 0.8rem 0.85rem;
    }

    body.eco-app .nav-toggle {
        grid-area: toggle;
        justify-self: start;
    }

    body.eco-app .topbar-user {
        grid-area: user;
    }

    body.eco-app .topbar-logout-form {
        grid-area: action;
        justify-self: end;
        align-self: start;
    }

    body.eco-app .topbar-logout-form .btn {
        min-width: 0;
        min-height: 46px;
        padding-inline: 0.85rem;
        font-size: 0.88rem;
    }

    body.eco-app .topbar-chip {
        font-size: 1.02rem;
    }

    body.eco-app .topbar-user-line {
        padding: 0.65rem 0.75rem;
        column-gap: 0.65rem;
    }

    body.eco-app .topbar-shortcuts {
        width: 100%;
    }

    body.eco-app .topbar-shortcut {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
    }

    body.eco-app .section-menu-link {
        min-width: max-content;
    }
}
